-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(settings): new prefers-reduced-motion setting
- Loading branch information
1 parent
c0ee1e9
commit 9962228
Showing
9 changed files
with
115 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
html[color-mode="cafe"] { | ||
filter: sepia(0.9) hue-rotate(315deg) brightness(0.9); | ||
} | ||
|
||
html[color-mode="contrast"] { | ||
filter: contrast(2); | ||
} | ||
|
||
html[color-mode="grayscale"] { | ||
filter: grayscale(100%); | ||
} | ||
|
||
html[color-mode="inverted"] { | ||
filter: invert(100%); | ||
} | ||
|
||
html[color-mode="grayscale-inverted"] { | ||
filter: grayscale(100%) invert(100%); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// this is for manual reduce motion | ||
html[reduce="true"] *, | ||
::before, | ||
::after { | ||
transition-duration: 0.001ms !important; | ||
transition-delay: 0s !important; | ||
animation: none !important; | ||
animation-duration: 0.001ms !important; | ||
animation-delay: -0.001ms !important; | ||
animation-iteration-count: 1 !important; | ||
|
||
--animate-duration: 0 !important; | ||
--animate-delay: 0 !important; | ||
--animate-repeat: 0 !important; | ||
} | ||
|
||
// this is for system reduce motion prefers | ||
@media (prefers-reduced-motion: reduce) { | ||
*, | ||
::before, | ||
::after { | ||
transition-duration: 0.001ms !important; | ||
transition-delay: 0s !important; | ||
animation: none !important; | ||
animation-duration: 0.001ms !important; | ||
animation-delay: -0.001ms !important; | ||
animation-iteration-count: 1 !important; | ||
|
||
--animate-duration: 0 !important; | ||
--animate-delay: 0 !important; | ||
--animate-repeat: 0 !important; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
@charset "UTF-8"; | ||
|
||
@import './abstracts/utils'; | ||
@import './abstracts/transition'; | ||
@import './base/base'; | ||
@import './base/scrollBar'; | ||
@import './components/select'; | ||
@import './components/loading'; | ||
@import './layout/tabs'; | ||
@import "./abstracts/utils"; | ||
@import "./abstracts/transition"; | ||
@import "./base/base"; | ||
@import "./base/scrollBar"; | ||
@import "./base/colorMode"; | ||
@import "./base/reducedMotion"; | ||
@import "./components/select"; | ||
@import "./components/loading"; | ||
@import "./layout/tabs"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters