mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00

* Give webviews a slide-in animation if reduced motion isn't set. * Auto-hide toolbar in review mode moving the mouse above the main webview expands the toolbar. When the mouse leaves the toolbar, it will collapse after a delay of 2s. * Save some space on bottom toolbars * Use props for all hard-coded transition durations and decrease most commonly used duration (200ms) to 150ms. * Move auto-hide logic into ToolbarWebView and handle auto-hide specific events in the respective webview subclasses. * Fix typing issues * Fix flickering issue * Add auto_hide_toolbar opt-in to preferences * Rename hide_toolbar to collapse_toolbar to better describe the dock-like behaviour. * Rename setting to minimize_distractions * Reduce calls to pm in eventFilter * Run formatter * Revert setting title to something more specific * Increase default animation time to 180ms * Inset toolbar in review mode when auto-hide is not enabled. * Use card background on toolbar and add glass effect * Use flatten/elevate over inset/outset * Use flatten/elevate over inset/outset * Update toolbar.py * Fix toolbar background delay * Tweak styles * Use "collapse" instead of "auto-hide" * Fix background misalignment in collapse mode * Do not collapse toolbar when pointer is outside MainWebView * Reduce hide_timer interval to 1000ms * Use CSS to hide toolbar instead of setting webview height * Add guard to prevent backdrop-filter: blur on Qt 5.14 * Apply transition to body instead of toolbar to not complicate things for #2301. * Fix Qt 5.14 and apply guard globally * Fix background image scaling difference * Tweak preference wording (dae)
125 lines
2 KiB
SCSS
125 lines
2 KiB
SCSS
/* Copyright: Ankitects Pty Ltd and contributors
|
|
* License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html */
|
|
|
|
@use "sass/vars";
|
|
|
|
hr {
|
|
background-color: vars.palette(darkgray, 0);
|
|
}
|
|
|
|
body {
|
|
margin: 20px;
|
|
overflow-wrap: break-word;
|
|
// default background setting to fit with toolbar
|
|
background-size: 100vw;
|
|
background-repeat: no-repeat;
|
|
background-attachment: fixed;
|
|
}
|
|
|
|
// explicit nightMode definition required
|
|
// to override default .card styling
|
|
body.nightMode {
|
|
background-color: var(--canvas);
|
|
color: var(--fg);
|
|
}
|
|
|
|
img {
|
|
max-width: 100%;
|
|
max-height: 95vh;
|
|
}
|
|
|
|
li {
|
|
text-align: start;
|
|
}
|
|
|
|
#_flag {
|
|
position: fixed;
|
|
[dir="ltr"] & {
|
|
right: 10px;
|
|
}
|
|
[dir="rtl"] & {
|
|
left: 10px;
|
|
}
|
|
top: 0;
|
|
font-size: 30px;
|
|
-webkit-text-stroke-width: 1px;
|
|
-webkit-text-stroke-color: black;
|
|
}
|
|
|
|
#_mark {
|
|
position: fixed;
|
|
[dir="ltr"] & {
|
|
left: 10px;
|
|
}
|
|
[dir="rtl"] & {
|
|
right: 10px;
|
|
}
|
|
top: 0;
|
|
font-size: 30px;
|
|
color: yellow;
|
|
-webkit-text-stroke-width: 1px;
|
|
-webkit-text-stroke-color: black;
|
|
}
|
|
|
|
#typeans {
|
|
width: 100%;
|
|
// https://anki.tenderapp.com/discussions/beta-testing/1854-using-margin-auto-causes-horizontal-scrollbar-on-typesomething
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
code#typeans {
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
.typeGood {
|
|
background: #afa;
|
|
color: black;
|
|
}
|
|
|
|
.typeBad {
|
|
color: black;
|
|
background: #faa;
|
|
}
|
|
|
|
.typeMissed {
|
|
color: black;
|
|
background: #ccc;
|
|
}
|
|
|
|
button {
|
|
margin: 1em 0.5em;
|
|
}
|
|
|
|
.replay-button {
|
|
text-decoration: none;
|
|
display: inline-flex;
|
|
vertical-align: middle;
|
|
margin: 3px;
|
|
|
|
svg {
|
|
width: 40px;
|
|
height: 40px;
|
|
|
|
circle {
|
|
fill: #fff;
|
|
stroke: #414141;
|
|
}
|
|
|
|
path {
|
|
fill: #414141;
|
|
}
|
|
}
|
|
}
|
|
|
|
.nightMode {
|
|
.latex {
|
|
filter: invert(100%);
|
|
}
|
|
}
|
|
|
|
.drawing {
|
|
zoom: 50%;
|
|
}
|
|
.nightMode img.drawing {
|
|
filter: unquote("invert(1) hue-rotate(180deg)");
|
|
}
|