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

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

From: Simon Pieters <simonp@opera.com>
Date: Tue, 06 Aug 2013 12:31:46 +0200
To: "www-style@w3.org" <www-style@w3.org>, Fran├žois REMY <francois.remy.dev@outlook.com>
Message-ID: <op.w1d4u8xridj3kv@simons-macbook-pro.local>
On Thu, 25 Jul 2013 20:13:09 +0200, Fran├žois REMY  
<francois.remy.dev@outlook.com> wrote:

> 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? 		 	   		

Also see https://www.w3.org/Bugs/Public/show_bug.cgi?id=16875

-- 
Simon Pieters
Opera Software
Received on Tuesday, 6 August 2013 10:27:18 UTC

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