RE: ::Parts of cats and hats everywhere, slashed by shadow

From: mjs@apple.com
Date: Fri, 7 Feb 2014 12:16:23 -0800

> 1) You did not address one of the biggest negatives of both 2 and 3: it locks in the shadow DOM structure of a component as part of the component's API contract, making it impossible to ever change it without breaking compatibility once a component is published. If a component consumer can use arbitrary selector paths into the component, and this is in fact the only API for styling parts of the component that is offered, then it is impossible for even a conscientious component consumer to avoid depending on details of the shadow DOM structure. Can you address this? Are we ok with components being locked into their exact shadow DOM structure forever?

How about recommending that component authors provide classes on parts/elements they expect (or find from experience) to most commonly need external styling? As far as I can see, it needs nothing beyond the shadow-piercing combinator, and you could do something like:

    super-control ^ .text-label

To select a specific part of a component.

-- 
James Ross <james@james-ross.co.uk> 		 	   		  

Received on Tuesday, 18 February 2014 17:30:49 UTC