diff --git a/src/assets/styles/base/_base.scss b/src/assets/styles/base/_base.scss index 17fa66c0..4bfe8fe3 100644 --- a/src/assets/styles/base/_base.scss +++ b/src/assets/styles/base/_base.scss @@ -12,34 +12,3 @@ body { height: 100%; overflow: hidden; } - -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%); -} - -html[reduce="true"] { - transition-duration: 0.001ms !important; - animation: none !important; - animation-duration: 0.001ms !important; - animation-iteration-count: 1 !important; - - --animate-duration: 0 !important; - --animate-deply: 0 !important; - --animate-repeat: 0 !important; -} diff --git a/src/assets/styles/base/_colorMode.scss b/src/assets/styles/base/_colorMode.scss new file mode 100644 index 00000000..23edfed9 --- /dev/null +++ b/src/assets/styles/base/_colorMode.scss @@ -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%); +} diff --git a/src/assets/styles/base/_reducedMotion.scss b/src/assets/styles/base/_reducedMotion.scss new file mode 100644 index 00000000..26915e98 --- /dev/null +++ b/src/assets/styles/base/_reducedMotion.scss @@ -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; + } +} diff --git a/src/assets/styles/main.scss b/src/assets/styles/main.scss index dfb555e7..28f7e676 100644 --- a/src/assets/styles/main.scss +++ b/src/assets/styles/main.scss @@ -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"; diff --git a/src/components/App/AppSettings/form/app.vue b/src/components/App/AppSettings/form/app.vue index 5c69bce6..af4521f5 100644 --- a/src/components/App/AppSettings/form/app.vue +++ b/src/components/App/AppSettings/form/app.vue @@ -5,6 +5,18 @@