Skip to content

Commit

Permalink
fix(overlays): hide overlays before hydration
Browse files Browse the repository at this point in the history
  • Loading branch information
TomMenga committed Nov 23, 2023
1 parent 6ff8255 commit 448811a
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
10 changes: 5 additions & 5 deletions src/components/dialog/dialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,6 @@
border-radius: 0;
}

:host([data-state='closing']) & {
pointer-events: none;
animation-name: close;
}

:host([data-state]:not([data-state='closed'])) & {
display: block;

Expand All @@ -151,6 +146,11 @@
}
}

:host([data-state][data-state='closing']) & {
pointer-events: none;
animation-name: close;
}

@include sbb.if-forced-colors {
outline: var(--sbb-border-width-1x) solid CanvasText;
}
Expand Down
10 changes: 5 additions & 5 deletions src/components/menu/menu/menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,6 @@
padding: 0;
overflow: hidden;

:host([data-state='closing']) & {
pointer-events: none;
animation-name: close;
}

:host([data-state]:not([data-state='closed'])) & {
display: block;
opacity: 1;
Expand All @@ -127,6 +122,11 @@
}
}

:host([data-state][data-state='closing']) & {
pointer-events: none;
animation-name: close;
}

@include sbb.if-forced-colors {
outline: var(--sbb-border-width-1x) solid CanvasText;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,6 @@
padding: 0;
overflow: hidden;

:host([data-state='closing']) & {
animation-name: close;
}

:host([data-state]:not([data-state='closed'])) & {
display: block;

Expand All @@ -127,6 +123,10 @@
}
}

:host([data-state][data-state='closing']) & {
animation-name: close;
}

@include sbb.if-forced-colors {
outline: var(--sbb-border-width-1x) solid CanvasText;
}
Expand Down
10 changes: 5 additions & 5 deletions src/components/navigation/navigation/navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,6 @@
background: var(--sbb-color-midnight-default);
}

:host([data-state='closing']) & {
pointer-events: none;
animation-name: close;
}

:host([data-state]:not([data-state='closed'])) & {
display: block;
pointer-events: all;
Expand All @@ -165,6 +160,11 @@
}
}

:host([data-state][data-state='closing']) & {
pointer-events: none;
animation-name: close;
}

@include sbb.if-forced-colors {
outline: var(--sbb-border-width-1x) solid CanvasText;
}
Expand Down
14 changes: 7 additions & 7 deletions src/components/tooltip/tooltip/tooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,20 @@
width: max-content;
background-color: var(--sbb-tooltip-background);

:host([data-state='closing']) & {
pointer-events: none;
:host([data-state]:not([data-state='closed'])) & {
display: block;

animation: {
name: close;
name: open;
duration: var(--sbb-tooltip-animation-duration);
timing-function: var(--sbb-tooltip-animation-easing);
}
}

:host([data-state]:not([data-state='closed'])) & {
display: block;

:host([data-state][data-state='closing']) & {
pointer-events: none;
animation: {
name: open;
name: close;
duration: var(--sbb-tooltip-animation-duration);
timing-function: var(--sbb-tooltip-animation-easing);
}
Expand Down

0 comments on commit 448811a

Please sign in to comment.