diff options
author | 2021-08-10 19:04:54 +0200 | |
---|---|---|
committer | 2021-08-10 22:34:54 +0530 | |
commit | 969eda02a66050cf4518ddfa657e86d1d6d8b6c3 (patch) | |
tree | 9f21b062f0c188f2c3ddfbb6594670982610aadf /src/components/ui | |
parent | refactor: Move platform-specific logic for shortcut keys into common location. (diff) | |
download | ferdium-app-969eda02a66050cf4518ddfa657e86d1d6d8b6c3.tar.gz ferdium-app-969eda02a66050cf4518ddfa657e86d1d6d8b6c3.tar.zst ferdium-app-969eda02a66050cf4518ddfa657e86d1d6d8b6c3.zip |
feat: follow OS reduced motion setting (#1757)
- add missing meta charset to index.html
- dont restrict scaling for user in index.html
- load animations.css conditionally based on motion preference
- load transitions conditionally in js and css based on motion preference
Co-authored-by: Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>
Diffstat (limited to 'src/components/ui')
-rw-r--r-- | src/components/ui/AppLoader/styles.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/components/ui/AppLoader/styles.js b/src/components/ui/AppLoader/styles.js index 755a56b40..011f6282d 100644 --- a/src/components/ui/AppLoader/styles.js +++ b/src/components/ui/AppLoader/styles.js | |||
@@ -1,3 +1,9 @@ | |||
1 | let sloganTransition = 'none'; | ||
2 | |||
3 | if (window.matchMedia('(prefers-reduced-motion: no-preference)')) { | ||
4 | sloganTransition = 'opacity 1s ease'; | ||
5 | } | ||
6 | |||
1 | export default { | 7 | export default { |
2 | component: { | 8 | component: { |
3 | color: '#FFF', | 9 | color: '#FFF', |
@@ -5,7 +11,7 @@ export default { | |||
5 | slogan: { | 11 | slogan: { |
6 | display: 'block', | 12 | display: 'block', |
7 | opacity: 0, | 13 | opacity: 0, |
8 | transition: 'opacity 1s ease', | 14 | transition: sloganTransition, |
9 | position: 'absolute', | 15 | position: 'absolute', |
10 | textAlign: 'center', | 16 | textAlign: 'center', |
11 | width: '100%', | 17 | width: '100%', |