Skip to content

Commit

Permalink
provide css vars to ::backdrop (#2519)
Browse files Browse the repository at this point in the history
  • Loading branch information
keithamus authored Sep 7, 2023
1 parent 229e771 commit 19018bc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/support/mixins/color-modes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@

/*! */ // This is a fix for a cssstats bug see https://github.com/cssstats/cssstats/issues/331
}

::backdrop,
[data-color-mode="light"][data-light-theme="#{$theme-name}"],
[data-color-mode="dark"][data-dark-theme="#{$theme-name}"]::backdrop {
@content;

/*! */ // Must remain separate from the above selector to not break browsers which don't support ::backdrop, e.g. Safari 14.
}
}

@else {
Expand Down

0 comments on commit 19018bc

Please sign in to comment.