We're giving away a free ticket to the CSS Layout Workshop. To be entered in the drawing, comment below with… - A question you have about CSS layout - Or a fun demo, trick, or snippet of CSS The winner will be announced on Friday, April 18! #css www.oddbird.net/workshops/ca...
Post
oddbird.netCascading LayoutsA workshop on resilient CSS layouts
A question I had yesterday was: What is the “flat tree”? I also wrote a blog post on how you could use Container Style Queries to expose internal states frehner.me/blog/contain...
frehner.meContainer Style Queries for Sharing Internal StateAn explanation of how you could use Container Style Queries to expose internal state (for example, in a Custom Element) to children elements in CSS.
Our selectors work on one tree or the other. Light styles `details > p` will select a p we put into details. But `:host > p` from the shadow styles won't. The "flat tree" is light+shadow smushed back together. Props inherit from details into the shadow content block back out to our slotted p.
0 reposts2 likes