W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2005

[whatwg] [html5] window.print() undefined

From: Kornel Lesinski <kornel@ideadesigners.com>
Date: Tue, 19 Jul 2005 10:12:02 +0100
Message-ID: <op.st5k6cn0jj9hi8@idlaptop02.mshome.net>
On Mon, 18 Jul 2005 22:05:10 +0100, Dean Edwards <dean at edwards.name> wrote:

> Olav Junker Kj?r wrote:
>>> If I set element.style.display = "block" how do I hide it using a  
>>> style sheet when it is printed?
>>   I dont think you should set element.style.display to "block", if the  
>> element should be visible only on screen and not in print. It would be  
>> better to dynamically assign it a class which is defined in the  
>> stylesheet to be visible on screen and not in print. (Its a bit tricky  
>> to add and remove class names, but still cleaner than using print  
>> events.)
>>
>
> The same can be said for screen settings. Should we disallow use of the  
> style property?

No, because it's needed for animation.

style attribute is supposed to have cascade value like ID selector.  
Therefore

html #id {display: none}

should override it. Even if not,

#id {display:none !important;}

has to.

-- 
regards, Kornel Lesinski
Received on Tuesday, 19 July 2005 02:12:02 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:42 UTC