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

> 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