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

Parentheses-free pseudo-elements

From: François REMY <francois.remy.dev@outlook.com>
Date: Tue, 16 Jul 2013 01:16:37 +0200
Message-ID: <DUB120-W349E006BD0E4845DC9D68FA5670@phx.gbl>
To: "www-style@w3.org" <www-style@w3.org>
CC: "jackalmage@gmail.com" <jackalmage@gmail.com>
TL/DR: With the use of Shadow DOM, I start seeing parametric pseudo-elements all over the place. This is great, but if those pseudo-elements use parentheses, they will not compose well with the nested rule proposal that are greatly needed to reduce the overhead those pseudo-elements introduce.

I therefore propose that parentheses around a pseudo-element should not be required if the pseudo-element is last in chain, which I think will be the case for most shadow-dom-related pseudo-elements, as well as region-related ones.

In fact, I'm strongly arguing for the parentheses-free syntax in all cases where it is known beforehand that no other pseudo-element would make sense after the parametric one.

This make it possible to write things like:

    ::distributed figure { ... }
    ::distributed ... ... ...


    ::distributed {{
        figure { ... }
        ... ... ...


    #my-region::region figure { ... }
    #my-region::region ... ... ...


    #my-region::region {{
        figure { ... }
        ... ... ...        

(where an isolated {}-island inside a selector triggers in-rule selector nesting)


PS: By the way, did someone beside Tab had a look at the {so-called} ":host(selector) pseudo-class" {previously known as the ":context()" pseudo-class}? It seems really crazy to me and not functionally belonging to the "pseudo-class family". If not, please have a look here:


and start a new thread if you feel the same as me 		 	   		  
Received on Monday, 15 July 2013 23:17:06 UTC

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