- Issue created by @m4olivei
- π¨π¦Canada m4olivei Grimsby, ON
We saw this in the wild on the Mukurtu distribution. It's an open source Drupal install profile (which you can set up quite easily!):
- First commit to issue fork.
- π·πΈSerbia finnsky
I added quick implementation of
https://web.dev/articles/declarative-shadow-dom
Almost current Drupal browserslist https://caniuse.com/declarative-shadow-domWorks as a charm. Toolbar button fixed ;)
- πΊπΈUnited States mherchel Gainesville, FL, US
CSS layers won't work because all declared layers will be less specific than styles with no declared layer (which is the rest of Drupal).
Web components would be ideal, because encapsulation is one of the main benefits. Not sure of @finnskyβs MR is enough though, as far as I can tell it just protects the button. It should also protect everything else there (list styles etc). From the Slack thread at https://drupal.slack.com/archives/C7AB68LJV/p1741201924377989, @m4olivei found issues with BigPipe and declarative shadow DOM not being compatible.
The additional specificity of the ID selector (like we did in offcanvas) is a great solution that would be relatively easy to apply if we can't get the web component method working.
- πͺπΈSpain plopesc Valladolid
We experienced something similar while integrating Navigation in one of our sites.
There was a global rule to apply specific styles to all the buttons across the whole site that cause conflicts with Navigation.
As reference, this is the diff that made the trick in that project:
-button, +/* Apply button styles in layout container to avoid global overrides */ +.layout-container:where(button), [type="submit"] { ...
- π³πΏNew Zealand quietone
Changing tags per Issue tags field β and Issue tags -- special tags β