W3C home > Mailing lists > Public > www-style@w3.org > July 2008

Re: The SCRIPT element

From: Patrick Garies <pgaries@fastmail.us>
Date: Wed, 16 Jul 2008 18:05:56 -0500
Message-ID: <487E7ED4.10108@fastmail.us>
To: Francois Remy <fremycompany_pub@yahoo.fr>
CC: www-style@w3.org
Francois Remy wrote:
>  How special is the SCRIPT element ? Is it only an element with {
>  display: none !important; content: ''; visibility: hidden; } ? Is it
>  an empty replaced element ? Can we have, in this case SCRIPT::after ?

This discussion is probably better suited for the HTML5 mailing list.

That said, I see no reason why the HTML/XHTML |script| element would be 
considered “special” or replaced. In Mozilla Firefox 3.0, Opera 9.51, 
and Safari 3.1.2, I can style the |script| element as if it were a |div| 
element, including through use of the |before| and |after| 
pseudo‐elements, so there seems to be general agreement here.

Only in Windows Internet Explorer 7.0.6001.18000 am I not able to do 
this; |script| elements are styled, as I would expect, but their content 
isn’t rendered (and, of course, WIE7 doesn’t support the |before| and 
|after| pseudo‐elements so nothing is rendered in that regard either).

I’ve attached two files (one HTML and one XHTML) that can be used to 
verify the mentioned behaviors in the mentioned browsers.

— Patrick Garies


Received on Wednesday, 16 July 2008 23:06:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:10 GMT