[css-selectors] Selecting non-element nodes

For some time already, people advocated for a way to select text nodes using CSS. 
 
 
 
Proposal:
 
   :node-type(x) pseudo-class, whose absence implies the "element" type
   { other values includes "all", "text", "comments"... }
 
   multiple comma-separated arguments are allowed and allows to create union sets
 
 
 
Use cases include:
 
- flowing text nodes into a css-region-flow while keeping some siblings out of the flow
 
    .to-flow-into> *:node-type(all) { flow-into: x }
    .to-flow-into> .not-in-flow { flow-into: none }
 
- hiding text-nodes as part of the continuing content of a document
 
    .read-more ~ *:node-type(all) {display:none})
 
- coloring them without affecting the other elements inherited color value
 
    .local-blue> *:node-type(text) { color: blue }


Thoughts? 		 	   		  

Received on Thursday, 25 July 2013 18:13:35 UTC