Fix button positioning for real (#1361)

This commit is contained in:
Lindsay M
2025-08-21 18:00:09 -04:00
committed by GitHub
parent adaea2fa5f
commit 4f1de3918b

View File

@@ -1,8 +1,17 @@
@layer wa-component { @layer wa-component {
:host { :host {
display: inline-block; display: inline-block;
/* Workaround because Chrome doesn't like :host(:has()) below
* https://issues.chromium.org/issues/40062355
* Firefox doesn't like this nested rule, so both are needed */
&:has(wa-badge) {
position: relative;
}
} }
/* Apply relative positioning only when needed to position wa-badge
* This avoids creating a new stacking context for every button */
:host(:has(wa-badge)) { :host(:has(wa-badge)) {
position: relative; position: relative;
} }