]> git.ipfire.org Git - thirdparty/bulma.git/commitdiff
Issue-3895: Make variables root configurable
authorgabor.kormany <gabor.kormany@zavamed.com>
Mon, 16 Sep 2024 14:36:28 +0000 (16:36 +0200)
committergabor.kormany <gabor.kormany@zavamed.com>
Mon, 16 Sep 2024 14:36:28 +0000 (16:36 +0200)
sass/base/generic.scss
sass/base/skeleton.scss
sass/components/navbar.scss
sass/form/tools.scss
sass/grid/columns.scss
sass/themes/_index.scss
sass/utilities/controls.scss
sass/utilities/css-variables.scss
sass/utilities/initial-variables.scss

index b7ee0ccbd5a575a2bdabe06daad88d2cf1daa2b1..b2229307b8ddfb48201381a972564c685a473834 100644 (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},
index 3a3dcab047f77c906d4429bc52c19e3c8df9f366..3ae23c6426c94cb461eb7ff57709f954242dcfff 100644 (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},
index 21414fc31821c3a025c709d0701c0863dcf1e60e..d4d6e38a76228c527b9df23f764c0b6ca079583b 100644 (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},
index 56354446321e7192f02ebffc633cda734c111334..1855dd34d32ea5ac16f3d7887f5b649f6648813d 100644 (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},
index 01fcb58c12f9bb9118aae929d483c1a99cb009b1..1ec72a8a237a1d88ba78d8f056983696d7969f37 100644 (file)
@@ -7,7 +7,7 @@
 
 $column-gap: 0.75rem !default;
 
-:root {
+#{cv.$variables-host} {
   @include cv.register-vars(
     (
       "column-gap": #{$column-gap},
index d4168f52d13a85b4264fbdc3273d7d628aad37fb..8cc8a0476cb304260df0006f3489cfc40cde5aba 100644 (file)
@@ -7,7 +7,7 @@
 @use "dark";
 @use "setup";
 
-:root {
+#{cv.$variables-host} {
   @include light.light-theme;
   @include setup.setup-theme;
 }
index 5ad16dd8598eb015c7a01109e0f2a736e1704d2c..0f9d91536f944e3d9a25bf370b090408fad7794f 100644 (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},
index b51cf200bbe01f3f3be5550d2ce84bf62302bb63..29d687477a4e25dd94a9e474a17f8fa9f4eefd34 100644 (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}";
 }
 
 @mixin system-theme($name) {
   @media (prefers-color-scheme: #{$name}) {
-    :root {
+    #{$variables-host} {
       @content;
     }
   }
index dbdab4e3a6be0477f905a7a0a1ae2dbef6e79739..72bdaebe37c1c1579ede31d4a5232ee385d59c66 100644 (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;