Skip to content

Commit

Permalink
set color-scheme based on current theme (#1360)
Browse files Browse the repository at this point in the history
  • Loading branch information
mayank99 authored Jun 16, 2023
1 parent 2a73b0e commit 30f5b28
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changeset/nervous-birds-shake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@itwin/itwinui-react': patch
'@itwin/itwinui-variables': patch
---

The `color-scheme` property will now be correctly set for dark theme, resulting in better theming of built-in html elements.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/itwinui-variables/src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

// global vars shared between all themes
:where([data-iui-theme]) {
color-scheme: light dark;
@include spacing;
@include component-heights;
@include border-radii;
Expand All @@ -20,6 +21,7 @@
}

:where([data-iui-theme='light']) {
color-scheme: light;
@include themes.light-theme;

&:where([data-iui-contrast='high']) {
Expand All @@ -28,6 +30,7 @@
}

:where([data-iui-theme='dark']) {
color-scheme: dark;
@include themes.dark-theme;

&:where([data-iui-contrast='high']) {
Expand Down

0 comments on commit 30f5b28

Please sign in to comment.