diff --git a/.changeset/hungry-pandas-roll.md b/.changeset/hungry-pandas-roll.md new file mode 100644 index 0000000000..86f8c20673 --- /dev/null +++ b/.changeset/hungry-pandas-roll.md @@ -0,0 +1,5 @@ +--- +'@primer/css': patch +--- + +Fix bug with `color-mode` mixin not applying correctly due to `::selection` diff --git a/src/support/mixins/color-modes.scss b/src/support/mixins/color-modes.scss index 40032bbebb..6383c27931 100644 --- a/src/support/mixins/color-modes.scss +++ b/src/support/mixins/color-modes.scss @@ -1,7 +1,6 @@ @mixin color-mode-theme($theme-name, $include-root: false) { @if $include-root { :root, - ::selection, [data-color-mode="light"][data-light-theme="#{$theme-name}"], [data-color-mode="dark"][data-dark-theme="#{$theme-name}"] { @content; @@ -33,7 +32,6 @@ @mixin color-mode($mode) { @if $mode == light { :root, - ::selection, [data-color-mode="light"][data-light-theme*="#{$mode}"], [data-color-mode="dark"][data-dark-theme*="#{$mode}"] { @content;