mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 04:09:12 +00:00
Fix button positioning for real (#1361)
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user