Skip to content

Commit

Permalink
fix(bs4,5): Only set $default: $secondary if secondary is a color (#…
Browse files Browse the repository at this point in the history
…1149)

* fix(bs4,5): Only set `$default: $secondary` if secondary is a color

* Resave distributed files (GitHub Action)

* Resave data (GitHub Action)

---------

Co-authored-by: gadenbuie <[email protected]>
  • Loading branch information
gadenbuie and gadenbuie authored Dec 11, 2024
1 parent 74a138c commit a8ef503
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Binary file modified R/sysdata.rda
Binary file not shown.
2 changes: 1 addition & 1 deletion inst/lib/bs4/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ $colors: map-merge(
// Semantically, $secondary is closest to BS3's 'default' theme color;
// so use that if specified. Otherwise, use a light instead of dark gray
// default color for $default since that's closer to bootstrap 3's default
$default: if(variable-exists("secondary"), $secondary, $gray-300) !default;
$default: if(variable-exists("secondary") and type-of($secondary) == color, $secondary, $gray-300) !default;

$primary: $blue !default;
$secondary: $gray-600 !default;
Expand Down
2 changes: 1 addition & 1 deletion inst/lib/bs5/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ $cyans: (
// Semantically, $secondary is closest to BS3's 'default' theme color;
// so use that if specified. Otherwise, use a light instead of dark gray
// default color for $default since that's closer to bootstrap 3's default
$default: if(variable-exists("secondary"), $secondary, $gray-300) !default;
$default: if(variable-exists("secondary") and type-of($secondary) == color, $secondary, $gray-300) !default;

// scss-docs-start theme-color-variables
$primary: $blue !default;
Expand Down
4 changes: 2 additions & 2 deletions tools/patches/025-default-theme-color.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ index 42d8142..dde6f2f 100644
+// Semantically, $secondary is closest to BS3's 'default' theme color;
+// so use that if specified. Otherwise, use a light instead of dark gray
+// default color for $default since that's closer to bootstrap 3's default
+$default: if(variable-exists("secondary"), $secondary, $gray-300) !default;
+$default: if(variable-exists("secondary") and type-of($secondary) == color, $secondary, $gray-300) !default;
+
$primary: $blue !default;
$secondary: $gray-600 !default;
Expand All @@ -35,7 +35,7 @@ index 706ee935..2ce8afc1 100644
+// Semantically, $secondary is closest to BS3's 'default' theme color;
+// so use that if specified. Otherwise, use a light instead of dark gray
+// default color for $default since that's closer to bootstrap 3's default
+$default: if(variable-exists("secondary"), $secondary, $gray-300) !default;
+$default: if(variable-exists("secondary") and type-of($secondary) == color, $secondary, $gray-300) !default;
+
// scss-docs-start theme-color-variables
$primary: $blue !default;
Expand Down

0 comments on commit a8ef503

Please sign in to comment.