Issue-3895: Make variables root configurable

This commit is contained in:
gabor.kormany 2024-09-16 16:36:28 +02:00
parent 9a1b620195
commit 646d520b62
9 changed files with 14 additions and 8 deletions

View File

@ -32,7 +32,7 @@ $pre-font-size: 0.875em !default;
$pre-padding: 1.25rem 1.5rem !default;
$pre-code-font-size: 1em !default;
:root {
#{cv.$variables-host} {
@include cv.register-vars(
(
"body-background-color": #{$body-background-color},

View File

@ -9,7 +9,7 @@ $skeleton-block-min-height: 4.5em !default;
$skeleton-lines-gap: 0.75em !default;
$skeleton-line-height: 0.75em !default;
:root {
#{cv.$variables-host} {
@include cv.register-vars(
(
"skeleton-background": #{$skeleton-background},

View File

@ -101,7 +101,7 @@ $navbar-colors: dv.$colors !default;
z-index: cv.getVar("navbar-fixed-z");
}
:root {
#{cv.$variables-host} {
@include cv.register-vars(
(
"navbar-height": #{$navbar-height},

View File

@ -15,7 +15,7 @@ $label-colors: shared.$form-colors !default;
$field-block-spacing: 0.75rem !default;
:root {
#{cv.$variables-host} {
@include cv.register-vars(
(
"label-color": #{$label-color},

View File

@ -7,7 +7,7 @@
$column-gap: 0.75rem !default;
:root {
#{cv.$variables-host} {
@include cv.register-vars(
(
"column-gap": #{$column-gap},

View File

@ -7,7 +7,7 @@
@use "dark";
@use "setup";
:root {
#{cv.$variables-host} {
@include light.light-theme;
@include setup.setup-theme;
}

View File

@ -16,7 +16,10 @@ $control-padding-horizontal: calc(0.75em - #{$control-border-width}) !default;
$control-focus-shadow-l: 50% !default;
:root {
@debug cv.$variables-host;
@debug iv.$radius;
#{cv.$variables-host} {
@include cv.register-vars(
(
"control-radius": #{$control-radius},

View File

@ -6,6 +6,8 @@
@use "initial-variables" as iv;
@use "functions" as fn;
$variables-host: iv.$variables-host;
@function buildVarName($name, $prefix: "", $suffix: "") {
@return "--#{iv.$cssvars-prefix}#{$prefix}#{$name}#{$suffix}";
}
@ -419,7 +421,7 @@
@mixin system-theme($name) {
@media (prefers-color-scheme: #{$name}) {
:root {
#{$variables-host} {
@content;
}
}

View File

@ -153,3 +153,4 @@ $class-prefix: "" !default;
$cssvars-prefix: "bulma-" !default;
$helpers-prefix: "is-" !default;
$helpers-has-prefix: "has-" !default;
$variables-host: ":root" !default;