diff --git a/qt/aqt/editor.py b/qt/aqt/editor.py index 08539a8e3..e6db3b05f 100644 --- a/qt/aqt/editor.py +++ b/qt/aqt/editor.py @@ -232,15 +232,14 @@ class Editor: self.web.stdHtml( _html % (bgcol, topbuts, tr.editing_show_duplicates()), css=[ - "css/vendor/bootstrap.min.css", "css/editor.css", ], js=[ "js/vendor/jquery.min.js", - "js/vendor/bootstrap.bundle.min.js", "js/editor.js", ], context=self, + default_css=False, ) self.web.eval("preventButtonFocus();") diff --git a/ts/editor/editor.scss b/ts/editor/editor.scss index 3e16a0392..a23c4bbfe 100644 --- a/ts/editor/editor.scss +++ b/ts/editor/editor.scss @@ -1,9 +1,12 @@ /* Copyright: Ankitects Pty Ltd and contributors * License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html */ -body { - color: var(--text-fg); - background-color: var(--bg-color); +@use 'ts/sass/base'; +@use 'ts/sass/buttons'; +@use 'ts/sass/scrollbar'; + +.nightMode { + @include scrollbar.night-mode; } #fields { diff --git a/ts/sass/_buttons.scss b/ts/sass/_buttons.scss deleted file mode 100644 index bddc3baff..000000000 --- a/ts/sass/_buttons.scss +++ /dev/null @@ -1,65 +0,0 @@ -@use 'fusion_vars'; - -.isWin { - button { - font-size: 12px; - } -} - -.isMac { - button { - font-size: 13px; - } -} - -.isLin { - button { - font-size: 14px; - - -webkit-appearance: none; - border-radius: 3px; - padding: 5px; - border: 1px solid var(--border); - } -} - -.nightMode { - button { - -webkit-appearance: none; - color: var(--text-fg); - - /* match the fusion button gradient */ - background: linear-gradient( - 0deg, - fusion_vars.$button-gradient-start 0%, - fusion_vars.$button-gradient-end 100% - ); - box-shadow: 0 0 3px fusion_vars.$button-outline; - border: 1px solid fusion_vars.$button-border; - - border-radius: 2px; - padding: 10px; - padding-top: 3px; - padding-bottom: 3px; - } - - button:hover { - background: fusion_vars.$button-hover-bg; - } -} - -/* imitate standard macOS dark mode buttons */ -.isMac.nightMode.macos-dark-mode button:not(.linkb) { - background: #656565; - box-shadow: 0 1px 2px #222222; - border-top-color: #848484; - border-top-width: 0.5px; - border-bottom: 0; - border-left: 0; - border-right: 0; - padding-top: 2px; - padding-bottom: 2px; - padding-left: 15px; - padding-right: 15px; - color: #e5e5e5; -} diff --git a/ts/sass/_card_counts.scss b/ts/sass/_card_counts.scss deleted file mode 100644 index 93296e3e1..000000000 --- a/ts/sass/_card_counts.scss +++ /dev/null @@ -1,15 +0,0 @@ -.review-count { - color: var(--review-count); -} - -.new-count { - color: var(--new-count); -} - -.learn-count { - color: var(--learn-count); -} - -.zero-count { - color: var(--zero-count); -} diff --git a/ts/sass/_fusion_vars.scss b/ts/sass/_fusion_vars.scss index 559d0a23b..9b91fb531 100644 --- a/ts/sass/_fusion_vars.scss +++ b/ts/sass/_fusion_vars.scss @@ -1,7 +1,7 @@ /* night-mode-specific colours */ -$fusion-button-gradient-start: #555555; -$fusion-button-gradient-end: #656565; -$fusion-button-outline: #222222; -$fusion-button-hover-bg: #656565; -$fusion-button-border: #646464; -$fusion-button-base-bg: #454545; +$button-gradient-start: #555555; +$button-gradient-end: #656565; +$button-outline: #222222; +$button-hover-bg: #656565; +$button-border: #646464; +$button-base-bg: #454545;