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.
This commit is contained in:
Lea Verou
2025-04-23 11:52:23 -04:00
committed by GitHub
parent 7545f04c46
commit cfc3f181a3
10 changed files with 43 additions and 23 deletions

View File

@@ -27,6 +27,7 @@ See your theme's focus ring in action by navigating this form example with your
<style>
form > * + * {
display: block;
--display: block;
width: fit-content;
margin-block-start: var(--wa-space-m);
}