mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 16:02:23 -04:00
Only disable specific animations/transitions/shadows
If I've missed any, follow-up PRs would be most appreciated. Closes #2557
This commit is contained in:
parent
51efcabf4a
commit
7d2ec8ed65
6 changed files with 12 additions and 26 deletions
|
@ -35,7 +35,10 @@
|
||||||
.toolbar {
|
.toolbar {
|
||||||
justify-self: center;
|
justify-self: center;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
transition: all var(--transition) ease-in-out;
|
|
||||||
|
.fancy & {
|
||||||
|
transition: all var(--transition) ease-in-out;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.hitem {
|
.hitem {
|
||||||
|
@ -57,7 +60,6 @@ body {
|
||||||
&:not(.fancy).hidden {
|
&:not(.fancy).hidden {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
transition: opacity var(--transition) ease-in-out;
|
|
||||||
|
|
||||||
&.fancy {
|
&.fancy {
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
|
|
|
@ -15,26 +15,18 @@
|
||||||
body {
|
body {
|
||||||
color: var(--fg);
|
color: var(--fg);
|
||||||
background: var(--canvas);
|
background: var(--canvas);
|
||||||
transition: opacity var(--transition-medium) ease-out;
|
&.fancy {
|
||||||
|
transition: opacity var(--transition-medium) ease-out;
|
||||||
|
}
|
||||||
margin: 2em;
|
margin: 2em;
|
||||||
overscroll-behavior: none;
|
overscroll-behavior: none;
|
||||||
&:not(.isMac),
|
&:not(.isMac),
|
||||||
&:not(.isMac) * {
|
&:not(.isMac) * {
|
||||||
@include scrollbar.custom;
|
@include scrollbar.custom;
|
||||||
}
|
}
|
||||||
&.reduce-motion,
|
|
||||||
&.reduce-motion *:not(.no-reduce-motion) {
|
|
||||||
transition: none !important;
|
|
||||||
animation: none !important;
|
|
||||||
}
|
|
||||||
&.no-blur * {
|
&.no-blur * {
|
||||||
backdrop-filter: none !important;
|
backdrop-filter: none !important;
|
||||||
}
|
}
|
||||||
&:not(.fancy),
|
|
||||||
&:not(.fancy) * {
|
|
||||||
box-shadow: none !important;
|
|
||||||
backdrop-filter: none !important;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
|
|
|
@ -388,7 +388,7 @@ class Toolbar:
|
||||||
|
|
||||||
return f"""
|
return f"""
|
||||||
<a class=hitem tabindex="-1" aria-label="{name}" title="{title}" id="{label}" href=# onclick="return pycmd('{label}')"
|
<a class=hitem tabindex="-1" aria-label="{name}" title="{title}" id="{label}" href=# onclick="return pycmd('{label}')"
|
||||||
>{name}<img id=sync-spinner class="no-reduce-motion" src='/_anki/imgs/refresh.svg'>
|
>{name}<img id=sync-spinner src='/_anki/imgs/refresh.svg'>
|
||||||
</a>"""
|
</a>"""
|
||||||
|
|
||||||
def set_sync_active(self, active: bool) -> None:
|
def set_sync_active(self, active: bool) -> None:
|
||||||
|
|
|
@ -49,19 +49,9 @@ body {
|
||||||
&:not(.isMac) * {
|
&:not(.isMac) * {
|
||||||
@include scrollbar.custom;
|
@include scrollbar.custom;
|
||||||
}
|
}
|
||||||
&.reduce-motion,
|
|
||||||
&.reduce-motion *:not(.no-reduce-motion) {
|
|
||||||
transition: none !important;
|
|
||||||
animation: none !important;
|
|
||||||
}
|
|
||||||
&.no-blur * {
|
&.no-blur * {
|
||||||
backdrop-filter: none !important;
|
backdrop-filter: none !important;
|
||||||
}
|
}
|
||||||
&:not(.fancy),
|
|
||||||
&:not(.fancy) * {
|
|
||||||
box-shadow: none !important;
|
|
||||||
backdrop-filter: none !important;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
button:not(.btn,.btn-close) {
|
button:not(.btn,.btn-close) {
|
||||||
|
|
|
@ -11,7 +11,9 @@ body {
|
||||||
color: var(--fg);
|
color: var(--fg);
|
||||||
background: var(--canvas);
|
background: var(--canvas);
|
||||||
margin: 1em;
|
margin: 1em;
|
||||||
transition: opacity var(--transition-medium) ease-out;
|
&.fancy {
|
||||||
|
transition: opacity var(--transition-medium) ease-out;
|
||||||
|
}
|
||||||
overscroll-behavior: none;
|
overscroll-behavior: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="range-box">
|
<div class="range-box">
|
||||||
<div class="spin no-reduce-motion" class:loading>◐</div>
|
<div class="spin" class:loading>◐</div>
|
||||||
|
|
||||||
<InputBox>
|
<InputBox>
|
||||||
<label>
|
<label>
|
||||||
|
|
Loading…
Reference in a new issue