Skip to content

Commit

Permalink
Add 2 color definitions for Windows High Contrast mode (#1890)
Browse files Browse the repository at this point in the history
* Add 2 color definitions for Windows High Contrast mode

* Adds changeset

* stylelint rule

* adds back comment
  • Loading branch information
andrialexandrou committed Jan 20, 2022
1 parent d1adf59 commit 74d0438
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/seven-dolls-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/css": patch
---

Adds --color-accent-emphasis and --color-fg-on-emphasis rules for Windows High Contrast Mode
11 changes: 11 additions & 0 deletions src/color-modes/native.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,14 @@
color: var(--color-fg-default);
background-color: var(--color-canvas-default);
}

// Windows High Contrast mode

// Improves focus state for various components when Windows High Contrast mode is enabled
// stylelint-disable selector-max-type
@media (forced-colors: active) {
body {
--color-accent-emphasis: Highlight;
--color-fg-on-emphasis: LinkText;
}
}

0 comments on commit 74d0438

Please sign in to comment.