Skip to content

Commit bfded54

Browse files
committed
perf: enforce margin to protect against global resets
1 parent 66b50c6 commit bfded54

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/styles/auro-tail-group.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,11 @@ $group-sizes: map.keys(private.$groups);
6767

6868
:host([layout="horizontal"][size="#{$size}"]) .group.horizontal ::slotted(auro-tail:first-child),
6969
:host([layout="horizontal"][size="#{$size}"]) .group.horizontal ::slotted([auro-tail]:first-child) {
70-
/* Compensate overlap for expanded tail widths (borders on both sides of both tails) */
71-
margin-right: calc(var(--ds-auro-tail-group-horiz-overlap-#{$size}) - 2 * var(--ds-auro-tail-group-horiz-border-w-#{$size}));
70+
/* Compensate overlap for expanded tail widths (borders on both sides of both tails)
71+
72+
Because this is slotted content & appears in the light DOM, use !important to override any external CSS resets
73+
*/
74+
margin-right: calc(var(--ds-auro-tail-group-horiz-overlap-#{$size}) - 2 * var(--ds-auro-tail-group-horiz-border-w-#{$size})) !important;
7275
/* First tail above second */
7376
z-index: var(--ds-auro-tail-z-index-group-front);
7477
}

0 commit comments

Comments
 (0)