fix(scss): preserve bare CSS fallback values in fi-var

Solve the problem of losing the default background color of the "mark" tag
This commit is contained in:
Cell
2026-08-12 11:25:11 +08:00
parent 7bdd0c5869
commit a9c29b1641
4 changed files with 8 additions and 11 deletions
+2 -2
View File
@@ -1,2 +1,2 @@
@forward "rgba" as fi-*;
@forward "var" as fi-*;
@forward "rgba";
@forward "var";
+2 -2
View File
@@ -5,6 +5,6 @@
/// @param {Number} $alpha [1] - Alpha channel value in range 0..1.
/// @example
/// color: fi-rgba(fi-var(secondary), 0.2);
@function rgba($color, $alpha: 1) {
@return string.unquote("rgb(from #{$color} r g b / #{$alpha})");
@function fi-rgba($color, $alpha: 1) {
@return rgb(from $color r g b / $alpha);
}
+3 -6
View File
@@ -9,13 +9,10 @@
/// @example
/// color: fi-var(global-font-color);
/// background: fi-var(custom-bg, #fff);
@function var($name, $fallback: null) {
@function fi-var($name, $fallback: null) {
@if $fallback != null {
@if meta.type-of($fallback) == string {
@return string.unquote('var(#{$rootPrefix}#{$name}, "#{$fallback}")');
}
@return string.unquote("var(#{$rootPrefix}#{$name}, #{$fallback})");
@return var(#{$rootPrefix}#{$name}, $fallback);
}
@return string.unquote("var(#{$rootPrefix}#{$name})");
@return var(#{$rootPrefix}#{$name});
}
+1 -1
View File
@@ -8,7 +8,7 @@
Called from: layouts/baseof.html.
*/ -}}
{{- hugo.Store.Set "version" "v1.0.0-alpha-msixwsck" -}}
{{- hugo.Store.Set "version" "v1.0.0-alpha-mspj0oak" -}}
{{- .Store.Set "this" dict -}}
{{- partial "init/detection-env.html" . -}}