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: Sat, 27 Jul 2013 00:27:25 +0200
Message-ID: <DUB120-W2587D522543C5DB9AEBA58A56A0@phx.gbl>
To: Simon Sapin <simon.sapin@exyr.org>, "www-style@w3.org" <www-style@w3.org>
> Le 26/07/2013 17:20, François REMY a écrit :
>>> I’m not super convinced. It seems that these examples would be
>>> used between "block-level" siblings, where you rarely have "naked"
>>> text nodes. (Often, there is at least a element.)

Note 5 from the css-regions spec:

|  Another consequence of moving elements
|  into named flows is that surrounding
|  whitespace is not moved into the named
|  flow. 
|  
|  If you have code like this:
|  
|      span {flow-into: span-content}
|      <span>one</span>
|      <span>two</span>
|  
|  Then the ‘span-content’ named flow 
|  contents will contain this:
|  
|    <span>one</span><span>two</span>
|  
|  Which will change the display from 
|  "one two" to "onetwo". If whitespace 
|  is significant, then moving the parent 
|  that contains the whitespace to the 
|  named flow is required.

Seems like an additional reason why you would like to select a text node (in this case to put in in the named flow)

    span, span + :node-type(text) {
        flow-into: span-content;
    } 		 	   		  
Received on Friday, 26 July 2013 22:27:52 UTC

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