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

Re: The SCRIPT element

From: Anne van Kesteren <annevk@opera.com>
Date: Wed, 16 Jul 2008 18:29:05 +0200
To: "Brad Kemper" <brkemper@comcast.net>
Cc: "Francois Remy" <fremycompany_pub@yahoo.fr>, "CSS 3 W3C Group" <www-style@w3.org>
Message-ID: <op.ued72nuc64w2qv@annevk-t60.oslo.opera.com>

On Wed, 16 Jul 2008 18:19:27 +0200, Brad Kemper <brkemper@comcast.net>  
wrote:
>> That sounds correct for HTML, since <script> is not parsed like any  
>> other element.
>
> That seems to contradict your earlier statement:

Why? HTML parsing is completely orthogonal to CSS layout.


> On Jul 16, 2008, at 8:28 AM, Anne van Kesteren wrote:
>> It's not really special in any particular way when it comes to CSS  
>> layout.
>
> If what you say is true about it being like any other element, then if  
> the script tag is set to display:block, shouldn't the comment part be  
> hidden, while still allowing borders and padding and such on the script  
> element?

No, the comment is part of the contents. As if you typed

   <span>&lt;!-- --></span>

or some such. (Check the DOM, you'll see that in the <script><!--  
--></script> case the <!-- --> part is actually a Text node, not a Comment  
node. (This is of course vastly different in XML.))


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>
Received on Wednesday, 16 July 2008 16:29:28 GMT

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