mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 23:12:21 -04:00
Move font size and scrollbar into _root-vars.scss
This commit is contained in:
parent
861e0c75bd
commit
a018b4f86a
10 changed files with 26 additions and 17 deletions
|
@ -25,6 +25,8 @@ for line in re.split(r"[;\{\}]|\*\/", open(root_vars_css).read()):
|
||||||
if line.startswith("/*!"):
|
if line.startswith("/*!"):
|
||||||
if "props" in line:
|
if "props" in line:
|
||||||
reached_props = True
|
reached_props = True
|
||||||
|
elif "rest" in line:
|
||||||
|
break
|
||||||
else:
|
else:
|
||||||
comment = re.match(r"\/\*!\s*(.*)$", line)[1]
|
comment = re.match(r"\/\*!\s*(.*)$", line)[1]
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
@use "sass:map";
|
@use "sass:map";
|
||||||
@use "vars" as *;
|
@use "vars" as *;
|
||||||
@use "functions" as *;
|
@use "functions" as *;
|
||||||
|
@use "scrollbar";
|
||||||
|
|
||||||
/*! colors */
|
/*! colors */
|
||||||
:root {
|
:root {
|
||||||
|
@ -50,3 +51,15 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*! rest */
|
||||||
|
:root {
|
||||||
|
font-size: prop(font-size);
|
||||||
|
body {
|
||||||
|
overscroll-behavior: none;
|
||||||
|
&:not(.isMac),
|
||||||
|
&:not(.isMac) * {
|
||||||
|
@include scrollbar.custom;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -13,6 +13,11 @@
|
||||||
|
|
||||||
$vars: (
|
$vars: (
|
||||||
props: (
|
props: (
|
||||||
|
font: (
|
||||||
|
size: (
|
||||||
|
default: 15px,
|
||||||
|
),
|
||||||
|
),
|
||||||
border-radius: (
|
border-radius: (
|
||||||
default: (
|
default: (
|
||||||
"Used to round corners of various UI elements",
|
"Used to round corners of various UI elements",
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
@use "vars" as *;
|
@use "vars" as *;
|
||||||
@use "root-vars";
|
@use "root-vars";
|
||||||
@use "scrollbar";
|
|
||||||
@use "button-mixins" as button;
|
@use "button-mixins" as button;
|
||||||
|
|
||||||
$body-color: color(fg);
|
$body-color: color(fg);
|
||||||
|
@ -43,16 +42,6 @@ html {
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
|
||||||
--base-font-size: 14px;
|
|
||||||
font-size: var(--base-font-size);
|
|
||||||
overscroll-behavior: none;
|
|
||||||
&:not(.isMac),
|
|
||||||
&:not(.isMac) * {
|
|
||||||
@include scrollbar.custom;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
button {
|
||||||
/* override transition for instant hover response */
|
/* override transition for instant hover response */
|
||||||
transition: color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
|
transition: color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
|
||||||
|
|
|
@ -49,7 +49,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
justify-content: start;
|
justify-content: start;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
font-size: var(--dropdown-font-size, var(--base-font-size));
|
font-size: var(--dropdown-font-size, var(--font-size));
|
||||||
|
|
||||||
background: none;
|
background: none;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
|
|
|
@ -47,7 +47,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
@include button.border-radius;
|
@include button.border-radius;
|
||||||
|
|
||||||
padding: 0;
|
padding: 0;
|
||||||
font-size: var(--base-font-size);
|
font-size: var(--font-size);
|
||||||
height: var(--buttons-size);
|
height: var(--buttons-size);
|
||||||
min-width: calc(var(--buttons-size) * 0.75);
|
min-width: calc(var(--buttons-size) * 0.75);
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
padding: 0 calc(var(--buttons-size) / 3);
|
padding: 0 calc(var(--buttons-size) / 3);
|
||||||
font-size: var(--base-font-size);
|
font-size: var(--font-size);
|
||||||
width: auto;
|
width: auto;
|
||||||
height: var(--buttons-size);
|
height: var(--buttons-size);
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
.congrats {
|
.congrats {
|
||||||
margin-top: 2em;
|
margin-top: 2em;
|
||||||
max-width: 30em;
|
max-width: 30em;
|
||||||
font-size: var(--base-font-size);
|
font-size: var(--font-size);
|
||||||
|
|
||||||
:global(a) {
|
:global(a) {
|
||||||
color: var(--fg-link);
|
color: var(--fg-link);
|
||||||
|
|
|
@ -60,7 +60,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
.tag {
|
.tag {
|
||||||
@include button.base($with-active: false, $with-disabled: false);
|
@include button.base($with-active: false, $with-disabled: false);
|
||||||
|
|
||||||
font-size: var(--base-font-size);
|
font-size: var(--font-size);
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
--border-color: var(--border);
|
--border-color: var(--border);
|
||||||
|
|
|
@ -267,7 +267,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
resize: none;
|
resize: none;
|
||||||
appearance: none;
|
appearance: none;
|
||||||
font: inherit;
|
font: inherit;
|
||||||
font-size: var(--base-font-size);
|
font-size: var(--font-size);
|
||||||
outline: none;
|
outline: none;
|
||||||
border: none;
|
border: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
Loading…
Reference in a new issue