Skip to content

Commit

Permalink
fix: enable in shadow DOM
Browse files Browse the repository at this point in the history
because:
- the `:root` selector does not work in the context of a
shadow DOM

this commit:
- extends the selector with the `:root` selector, so the
CSS variables are known inside a shadow DOM
  • Loading branch information
csshugs committed Nov 10, 2022
1 parent 5c90c87 commit 39d07df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/generic/_generic.ms-custom-properties.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
* Generate the custom properties necessary to calculate the different ratios
* at runtime in CSS.
*/
:root {
:root,
:host {
@each $scale in map-get($FLUIDMS-CONFIG, scales) {
--ms#{$scale}-ratio: #{fluidms-pow(map-get($FLUIDMS-CONFIG, ratio), $scale)};
@if $FLUIDMS-GLOBAL-BASELINE {
Expand Down

0 comments on commit 39d07df

Please sign in to comment.