anki/sass/base.scss
Matthias Metelka 23e6b2123e
Redesign deck options inputs (#2082)
* Create _input-mixins.scss

* Use button-mixins on more elements

* Replace <select> tag with custom Select component

* Fix RevertButton causing cursor: pointer when hidden

* Increase SaveButton chevron width

* Hide floating component box-shadow when inactive

* Rework SpinBox and move it into components

* Run eslint and prettier

* Remove leftover options prop

* Pass disabled array to EnumSelector again

* Update MapperRow.svelte

* Darken QHeaderView border color

Slipping this in without an extra PR.

* Adjust disabled color, border and cursor

* Remove redundant icon definition from stylesheets

* Fix deck options initial config

* Fix z-index issues in change notetype screen

It might be best to handle z-index locally in each user component instead of hard-coded component values.

* Give web SpinBox a horizontal design

* Give QRadioButton the same treatment as QCheckBox in #2079

* Fix unused CSS selector warning with base button-mixin

* Remove redundant import

* Fix deck options save button

* Delete input-mixins and remove unused down-arrow

* Run eslint on change-notetype

* Run eslint on components
2022-09-27 12:16:45 +10:00

114 lines
1.8 KiB
SCSS

@use "vars";
@use "scrollbar";
@use "button-mixins" as button;
$body-color: var(--fg);
$body-bg: var(--canvas);
$link-hover-color: var(--accent-link);
$link-hover-decoration: none;
$utilities: (
"opacity": (
property: opacity,
values: (
0: 0,
25: 0.25,
50: 0.5,
75: 0.75,
100: 1,
),
),
);
@import "bootstrap/scss/bootstrap-reboot";
@import "bootstrap/scss/bootstrap-utilities";
/* Bootstrap "extensions" */
.flex-basis-100 {
flex-basis: 100%;
}
.flex-basis-75 {
flex-basis: 75%;
}
html,
body {
height: 100%;
}
html {
overflow-x: hidden;
}
body {
overscroll-behavior: none;
&:not(.isMac),
&:not(.isMac) * {
@include scrollbar.custom;
}
}
button {
/* override transition for instant hover response */
transition: color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}
pre,
code,
kbd,
samp {
unicode-bidi: normal !important;
}
.isWin {
--base-font-size: 12px;
}
.isMac {
--base-font-size: 13px;
}
.isLin {
--base-font-size: 14px;
}
[dir="rtl"] {
.form-select {
/* flip <select>'s arrow */
background-position: left 0.75rem center;
}
}
.form-select:focus {
outline: none;
border: 1px solid var(--border-focus);
box-shadow: none !important;
}
.night-mode .form-select:disabled {
background-color: var(--fg-disabled);
}
.reduced-motion * {
transition: none !important;
animation: none !important;
}
select {
@include button.background;
@include button.border-radius;
cursor: pointer;
outline: none;
&:focus,
&.focus {
border: 1px solid var(--border-focus);
}
option {
background: var(--canvas-elevated);
color: var(--fg);
}
}