From cfc3f181a3c9fd879b981e1a386c2c1ef5e666bc Mon Sep 17 00:00:00 2001 From: Lea Verou Date: Wed, 23 Apr 2025 11:52:23 -0400 Subject: [PATCH] Fix broken demo, improve passthrough CSS (#879) Fixes several issues for components using the `display: contents` technique: - Introduce `--display` CSS property to make it possible to override internal display value of base part. - Ensure `display: contents` is always applied with `!important` to avoid rendering glitches like the one here - Ensure non-inherited custom properties are also inherited - Ensure the `hidden` attribute still works. --- docs/docs/tokens/focus.md | 1 + src/components/button/button.css | 8 ++----- src/components/button/button.ts | 4 +++- src/components/details/details.css | 5 +--- src/components/details/details.ts | 4 +++- src/components/progress-bar/progress-bar.css | 4 +--- src/components/progress-bar/progress-bar.ts | 4 +++- src/components/radio-button/radio-button.css | 7 +----- src/components/radio-button/radio-button.ts | 4 +++- src/styles/shadow/passthrough.css | 25 ++++++++++++++++++++ 10 files changed, 43 insertions(+), 23 deletions(-) create mode 100644 src/styles/shadow/passthrough.css diff --git a/docs/docs/tokens/focus.md b/docs/docs/tokens/focus.md index d1dbac7b0..f0550947f 100644 --- a/docs/docs/tokens/focus.md +++ b/docs/docs/tokens/focus.md @@ -27,6 +27,7 @@ See your theme's focus ring in action by navigating this form example with your