Skip to content

Commit a8ef503

Browse files
authored
fix(bs4,5): Only set $default: $secondary if secondary is a color (#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]>
1 parent 74a138c commit a8ef503

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

R/sysdata.rda

6.46 KB
Binary file not shown.

inst/lib/bs4/scss/_variables.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ $colors: map-merge(
6969
// Semantically, $secondary is closest to BS3's 'default' theme color;
7070
// so use that if specified. Otherwise, use a light instead of dark gray
7171
// default color for $default since that's closer to bootstrap 3's default
72-
$default: if(variable-exists("secondary"), $secondary, $gray-300) !default;
72+
$default: if(variable-exists("secondary") and type-of($secondary) == color, $secondary, $gray-300) !default;
7373

7474
$primary: $blue !default;
7575
$secondary: $gray-600 !default;

inst/lib/bs5/scss/_variables.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ $cyans: (
300300
// Semantically, $secondary is closest to BS3's 'default' theme color;
301301
// so use that if specified. Otherwise, use a light instead of dark gray
302302
// default color for $default since that's closer to bootstrap 3's default
303-
$default: if(variable-exists("secondary"), $secondary, $gray-300) !default;
303+
$default: if(variable-exists("secondary") and type-of($secondary) == color, $secondary, $gray-300) !default;
304304

305305
// scss-docs-start theme-color-variables
306306
$primary: $blue !default;

tools/patches/025-default-theme-color.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ index 42d8142..dde6f2f 100644
99
+// Semantically, $secondary is closest to BS3's 'default' theme color;
1010
+// so use that if specified. Otherwise, use a light instead of dark gray
1111
+// default color for $default since that's closer to bootstrap 3's default
12-
+$default: if(variable-exists("secondary"), $secondary, $gray-300) !default;
12+
+$default: if(variable-exists("secondary") and type-of($secondary) == color, $secondary, $gray-300) !default;
1313
+
1414
$primary: $blue !default;
1515
$secondary: $gray-600 !default;
@@ -35,7 +35,7 @@ index 706ee935..2ce8afc1 100644
3535
+// Semantically, $secondary is closest to BS3's 'default' theme color;
3636
+// so use that if specified. Otherwise, use a light instead of dark gray
3737
+// default color for $default since that's closer to bootstrap 3's default
38-
+$default: if(variable-exists("secondary"), $secondary, $gray-300) !default;
38+
+$default: if(variable-exists("secondary") and type-of($secondary) == color, $secondary, $gray-300) !default;
3939
+
4040
// scss-docs-start theme-color-variables
4141
$primary: $blue !default;

0 commit comments

Comments
 (0)