[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: CSS Media="print" support problems
From:       Martijn Klingens <mklingens () yahoo ! com>
Date:       2001-09-21 21:29:55
[Download RAW message or body]

On Friday 21 September 2001 18:13, Lars Knoll wrote:
> It's unfortunately not that easy, as there are several cases we have to
> look for. The simple and obvious one is when a whole stylesheet has a
> certain mediatype as in <link rel=stylesheet sr=... type=print> (hope I
> remember the syntax correct). But you can mix different media typed in one
> style sheet, as in
>
> foo { color: red }
>
> @media print {
> 	 foo { color: blue; }
> }
>
> @media screen {
> 	foo {color: green; }
> }
>
> To be able to handle this correctly, we need a correct implementation of
> the MediaRule in the DOM, and cssparser. After that we could add a
> parameter for the media to the construtor of the CSSStyleSelector, which
> would only pick up matching rules.

I guessed so. The code is not entirely clear yet, though I seem to understand 
most of it globally. What class did you have in mind to put the media rule?

> It's on my todo list since ages, but I didn't find the time to work on it
> up to now (unfortunately almost no time at all for khtml in the last 2
> months). Feel free to try to implement this.

If I get some pointers in the right direction then I'll try that monday at 
work. I do have a deadline for my project and if it takes too much time then 
I will have to find another solution.

BTW, does this mean that it breaks BC? Because in that case I am forced to 
switch to CVS HEAD or being unable to actually commit the code. Neither of 
which I particularly like for this project.

I don't have time to do this in my spare time, so it will be under the cover 
of my (closed source) kiosk application, with the associated restrictions as 
opposed by my company. (The only important restriction is that any code that 
is clearly aimed at kiosk apps may not be made open source, which is luckily 
not the case here - I may make fixes to KHTML and obey the LGPL license there 
so we can all make use of this stuff.)

Martijn

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic