Skip to content

Commit

Permalink
Add ::selection to root color vars (#2437)
Browse files Browse the repository at this point in the history
* add selection selector

* Create quiet-wasps-care.md

---------

Co-authored-by: Cameron Dutro <[email protected]>
  • Loading branch information
langermank and camertron authored May 16, 2023
1 parent 12488ce commit 616c893
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/quiet-wasps-care.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/css": patch
---

Add `::selection` to root color vars
2 changes: 2 additions & 0 deletions src/support/mixins/color-modes.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@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 @@ -32,6 +33,7 @@
@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 616c893

Please sign in to comment.