DEV Community

Discussion on: What s wrong with the gorilla?

 
peerreynders profile image
peerreynders • Edited

If you where true, why did they invent the shadow dom then?

About Web Components - Why Shadow DOM?:

While the theory was good on paper, the practice is that only ads and ads providers somehow benefit from this technology


they will need state dependent styling. Yes, you are right, CSS features a top down approach that does not fit to this task.

On the simplest level that is accomplished by adding and removing CSS classes but even techniques like quantity queries are available. So the "component" has control of the class names on the DOM elements to reflect visual state but the top-down styles get to actually act on it - because layout and visual design has to be orchestrated as a whole.


Thread Thread
 
efpage profile image
Eckehard

"We all love the Web, but in stories like this one, it feels like the Web doesn’t really love us back … or not as much"

Thread Thread
 
peerreynders profile image
peerreynders

And Andrea Giammarchi has been at it (the web) since before 2006 - and he will keep at it for the foreseeable future. Got to admire that but if that's what it takes …