Post

I wasn't there with Håkon & Bert 😅 but… If we're just trying to establish a container for text, content-box makes the most sense! I want a line length of 30em, I set the width to 30em. padding doesn't mess it up. That only becomes an issue once layout gets more complicated.

Ah, yes, the days of grey pages. Like so much in design, it can be a challenge to accommodate every future use case elegantly. Thanks.

The DOM is a tree of nested elements. But shadow-DOM creates alternate universe trees. Consider details/summary: - in the light tree, details element contains a summary & anything else we put in there - in the shadow tree, it contains a summary & a (hidden to us) content block with a slot inside

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.

With a caveat that I didn't check my assumption of how details/summary elements are actually structured in browsers, and the actual shadow structure might be different between browsers – but it seemed like a simple example we could all imagine working that way. :)

How do developers handle accessibility concerns, like ensuring proper keyboard navigation and screen reader support, when using advanced CSS layout techniques for non-standard UI patterns?

Hi - I'm not entirely sure what non-standard ui patterns we're talking about. There's no single answer to a11y concerns – planning & testing are essential. But generally the goal of using more modern CSS is that we're less likely to break things when we're not reaching for complicated workarounds.