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

RE: [css-selectors] Selecting non-element nodes

From: François REMY <francois.remy.dev@outlook.com>
Date: Fri, 26 Jul 2013 19:50:36 +0200
Message-ID: <DUB120-W33E355E2C7A61AE26DCB09A56A0@phx.gbl>
To: Simon Sapin <simon.sapin@exyr.org>
CC: "www-style@w3.org" <www-style@w3.org>
> Assuming we treat comments as text that default do 'display: none', what
> does it mean to apply properties to a doctype or a processing instruction?

Display them as a text node? They're similar to text nodes, they have a node value. When they're displayed, their node value has to be displayed as text content.




>> If the DOM had one text node per letter, so let it be. [...]
>>
>> However, what it means from the layout perspective is that you can
>> target an annonymous box that wraps the text nodes or comments node.
>
> This is a very important point! It means that you’re not selecting
> individual nodes, but a new concept that has to be defined. How does
> this wrapping work? Take the largest possible sequences of nodes with
> the same type?

Nope. I'm selecting nodes exactly the way the DOM on which CSS is applied define them. No transformation applied. I don't think anybody want to select "merged" content, and if they want they would have to consult the HTML spec to see how they can achieve that. Selectors always ends up selecting one node of the DOM tree {and I don't want to change that}, it just happen that until now this node always was an element {and I would like to lift that restriction}. 		 	   		  
Received on Friday, 26 July 2013 17:51:04 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:32 UTC