RE: [css-regions][shadowdom] @region rule and ::distributed() pseudo-element

> From: daniel.glazman@disruptive-innovations.com
>
> On 17/04/13 23:10, François REMY wrote:
>
> >> One drawback to using a functional pseudo-element compared to an @rule is
> >> more typing. If you have more than one selector argument to pass to the
> >> function you have to repeat .container::distributed() for each selector.
> >
> > The lack of nested rules shouldn't be a reason to introduce more at-rules. Shouldn't selectors and @rules be kept orthogonal?
>
> I just don't understand such arguments.

Then, I'll give you an hint. Alan is saying that

  #main-content article::distributed(h1) { ... }
  #main-content article::distributed(h2) { ... }
  #main-content article::distributed(h3) { ... }

requires too much typing and that

  @distributed #main-content article { 
     h1 { ... }
     h2 { ... }
     h3 { ... }
  } 

could be better. I didn't say he was wrong.


I'm just saying that

  #main-content article > h1 { ... }
  #main-content article > h2 { ... }
  #main-content article > h3 { ... }

also requires too much typing and that solving this issue is already planned with nested rules and/or macros. I don't see why we would need another mechanism to solve this redundency issue with an at-rule that would only work in one specific case while the solution to a more general problem is already in the works.

Solving the general problem of selector redundency make solving the particular case of ::distributed much less important, according to me. But it's only my opinion, I don't expect anybody to agree on everything I say ;-) 		 	   		  

Received on Thursday, 25 April 2013 16:38:31 UTC