Skip to content

Commit

Permalink
Revert "Add ::selection to root color vars" (#2468)
Browse files Browse the repository at this point in the history
* Revert "Add `::selection` to root color vars (#2437)"

This reverts commit 616c893.

* changeset
  • Loading branch information
keithamus committed Jun 22, 2023
1 parent 00c7645 commit c6d5d1d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/hungry-pandas-roll.md
@@ -0,0 +1,5 @@
---
'@primer/css': patch
---

Fix bug with `color-mode` mixin not applying correctly due to `::selection`
2 changes: 0 additions & 2 deletions 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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit c6d5d1d

Please sign in to comment.