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>  
>> 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
Received on Wednesday, 16 July 2008 16:29:28 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:38 UTC