Re: The SCRIPT element

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 UTC