diff options
| author | eugenesvk | 2023-05-03 22:17:20 +0700 |
|---|---|---|
| committer | Jieiku | 2023-05-22 23:04:19 -0700 |
| commit | ca7e31023b335e72eac6ce2f280a11b98b672fee (patch) | |
| tree | 815a148c5e69e3aa0c075fb2d9b002683c424265 | |
| parent | 428dd1fd0a5bd640a8617a9486ecd2f7c5bf29bf (diff) | |
| download | abridge-ca7e31023b335e72eac6ce2f280a11b98b672fee.tar.gz abridge-ca7e31023b335e72eac6ce2f280a11b98b672fee.tar.bz2 abridge-ca7e31023b335e72eac6ce2f280a11b98b672fee.zip | |
Replace direct root rules with a root mixin in variables
and include the variables root rules in the themes
| -rw-r--r-- | sass/_imports.scss | 2 | ||||
| -rw-r--r-- | sass/_variables.scss | 2 | ||||
| -rw-r--r-- | sass/abridge-auto.scss | 7 | ||||
| -rw-r--r-- | sass/abridge-dark.scss | 7 | ||||
| -rw-r--r-- | sass/abridge-light.scss | 7 | ||||
| -rw-r--r-- | sass/abridge.scss | 7 |
6 files changed, 22 insertions, 10 deletions
diff --git a/sass/_imports.scss b/sass/_imports.scss index 5dfb5a8..b615533 100644 --- a/sass/_imports.scss +++ b/sass/_imports.scss @@ -13,7 +13,7 @@ */ // Config -@use "variables"; +@forward "variables" as var-*; // Includes - Sorted by importance/category (includes at top are needed most frequently) @use "include/document"; // html diff --git a/sass/_variables.scss b/sass/_variables.scss index 8ad0fa8..a45495a 100644 --- a/sass/_variables.scss +++ b/sass/_variables.scss @@ -118,7 +118,7 @@ $icon-sun: false !default;// light sun $font: "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-mono: 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 { +@mixin root { #{--ff}: $font; #{--fm}: $font-mono;//code diff --git a/sass/abridge-auto.scss b/sass/abridge-auto.scss index b212053..6db0963 100644 --- a/sass/abridge-auto.scss +++ b/sass/abridge-auto.scss @@ -1,8 +1,11 @@ @use "imports"; -@use "variables"; @use "syntax/syntax-abridge" as syntax; -@if variables.$syntax { +:root { + @include imports.var-root; +} + +@if imports.$var-syntax { :root { @include syntax.dark; } diff --git a/sass/abridge-dark.scss b/sass/abridge-dark.scss index 393d62f..8303026 100644 --- a/sass/abridge-dark.scss +++ b/sass/abridge-dark.scss @@ -1,8 +1,11 @@ @use "imports"; -@use "variables"; @use "syntax/syntax-abridge" as syntax; -@if variables.$syntax { +:root { + @include imports.var-root; +} + +@if imports.$var-syntax { @include syntax.dark; } diff --git a/sass/abridge-light.scss b/sass/abridge-light.scss index b2dd1ea..82ec159 100644 --- a/sass/abridge-light.scss +++ b/sass/abridge-light.scss @@ -1,8 +1,11 @@ @use "imports"; -@use "variables"; @use "syntax/syntax-abridge" as syntax; -@if variables.$syntax { +:root { + @include imports.var-root; +} + +@if imports.$var-syntax { @include syntax.light; } diff --git a/sass/abridge.scss b/sass/abridge.scss index 9790d69..e74ce28 100644 --- a/sass/abridge.scss +++ b/sass/abridge.scss @@ -1,8 +1,11 @@ @use "imports"; -@use "variables"; @use "syntax/syntax-abridge" as syntax; -@if variables.$syntax { +:root { + @include imports.var-root; +} + +@if imports.$var-syntax { :root:not(.light) { @include syntax.dark; } |
