From 1010c41b8ac22e7e69177e0d02e034896fb9eadb Mon Sep 17 00:00:00 2001 From: eugenesvk Date: Mon, 1 May 2023 15:39:04 +0700 Subject: Replace hardcoded font family list in CSS vars with sass vars Allows (in the future after all the use refactor is done) the user to - programmatically adjust the list (i.e., append a couple of fonts) instead of having to copy&paste the full list - directly override the list in the theme - combine the previous two items (will only work when everything is a mixin otherwise the styles are inserted on import and are not affected by later variable overrides) --- sass/_variables.scss | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sass') diff --git a/sass/_variables.scss b/sass/_variables.scss index 6c957a8..839528a 100644 --- a/sass/_variables.scss +++ b/sass/_variables.scss @@ -113,9 +113,12 @@ $icon-moon: false !default;// dark moon $icon-sun: false !default;// light sun // add an icon link to an html template like this: +$font-main : "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Noto Sans", Helvetica, Arial, sans-serif !default; +$font-code : ui-monospace, Menlo, Monaco, Consolas, "SF Mono", "Cascadia Mono", "Segoe UI Mono", "DejaVu Sans Mono", "Liberation Mono", "Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Ubuntu Mono", "Source Code Pro", "Fira Mono", "Droid Sans Mono", "Courier New", Courier, monospace !default; + :root { - --ff: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Noto Sans", Helvetica, Arial, sans-serif; - --fm: ui-monospace, Menlo, Monaco, Consolas, "SF Mono", "Cascadia Mono", "Segoe UI Mono", "DejaVu Sans Mono", "Liberation Mono", "Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Ubuntu Mono", "Source Code Pro", "Fira Mono", "Droid Sans Mono", "Courier New", Courier, monospace; + #{--ff}: $font-main; + #{--fm}: $font-code; // Spacings --s1: .5rem; -- cgit v1.3.1