From c6d5d1dfd3eafe44197ddc262f605dc5373437ac Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Thu, 22 Jun 2023 11:26:10 +0100 Subject: [PATCH] Revert "Add `::selection` to root color vars" (#2468) * Revert "Add `::selection` to root color vars (#2437)" This reverts commit 616c89354bf8571488674b44f431361d66e9eae3. * changeset --- .changeset/hungry-pandas-roll.md | 5 +++++ src/support/mixins/color-modes.scss | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 .changeset/hungry-pandas-roll.md 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;