Skip to content

Commit

Permalink
Fix cerulean's BS5 patch
Browse files Browse the repository at this point in the history
  • Loading branch information
cpsievert committed Apr 12, 2021
1 parent 90c5617 commit 427e4e2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion inst/lib/bs4/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ $colors: map-merge(
$colors
);

// Semantically, $secondary is closest to BS3's 'default' theme color;
// 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;
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 @@ -66,7 +66,7 @@ $colors: (
) !default;
// scss-docs-end colors-map

// Semantically, $secondary is closest to BS3's 'default' theme color;
// 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;
Expand Down
15 changes: 7 additions & 8 deletions inst/lib/bsw5/dist/cerulean/_bootswatch.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@

$text-shadow: 0 1px 0 rgba(0, 0, 0, .05) !default;

// See inst/bs3compat/_declarations.scss
// It's very important that this come before other btn-* rules
@if variable-exists("default") {
.btn-default {
@include btn-shadow($default);
}
}

// Mixins

@mixin btn-shadow($color){
Expand Down Expand Up @@ -45,6 +37,13 @@ $text-shadow: 0 1px 0 rgba(0, 0, 0, .05) !default;
text-shadow: $text-shadow;
}

// It's very important that this come before other btn-* rules
@if variable-exists("default") {
.btn-default {
@include btn-shadow($default);
}
}

.btn-primary {
@include btn-shadow($primary);
}
Expand Down
15 changes: 7 additions & 8 deletions tools/patches/006-bootswatch-cerulean-bs5.patch
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
diff --git a/inst/lib/bsw5/dist/cerulean/_bootswatch.scss b/inst/lib/bsw5/dist/cerulean/_bootswatch.scss
index 8eda79b..169696a 100644
index 8eda79b..be26e7d 100644
--- a/inst/lib/bsw5/dist/cerulean/_bootswatch.scss
+++ b/inst/lib/bsw5/dist/cerulean/_bootswatch.scss
@@ -6,6 +6,14 @@
@@ -37,6 +37,13 @@ $text-shadow: 0 1px 0 rgba(0, 0, 0, .05) !default;
text-shadow: $text-shadow;
}

$text-shadow: 0 1px 0 rgba(0, 0, 0, .05) !default;

+// See inst/bs3compat/_declarations.scss
+// It's very important that this come before other btn-* rules
+@if variable-exists("default") {
+ .btn-default {
+ @include btn-shadow($default);
+ }
+}
+
// Mixins

@mixin btn-shadow($color){
.btn-primary {
@include btn-shadow($primary);
}

0 comments on commit 427e4e2

Please sign in to comment.