Skip to content

Commit

Permalink
Follow up to #3366: don't change sliderInput()'s default accent color
Browse files Browse the repository at this point in the history
  • Loading branch information
cpsievert committed Jun 15, 2021
1 parent b3247d5 commit e089e73
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
7 changes: 5 additions & 2 deletions R/input-slider.R
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,11 @@ ionRangeSliderDependencyCSS <- function(theme) {
}

bslib::bs_dependency(
input = sass::sass_file(
system.file(package = "shiny", "www/shared/ionrangeslider/scss/shiny.scss")
input = list(
list(accent = "$component-active-bg"),
sass::sass_file(
system.file(package = "shiny", "www/shared/ionrangeslider/scss/shiny.scss")
)
),
theme = theme,
name = "ionRangeSlider",
Expand Down
8 changes: 4 additions & 4 deletions inst/www/shared/ionrangeslider/css/ion.rangeSlider.css
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@
.irs--shiny .irs-bar {
top: 25px;
height: 8px;
border-top: 1px solid #337ab7;
border-bottom: 1px solid #337ab7;
background: #337ab7;
border-top: 1px solid #428bca;
border-bottom: 1px solid #428bca;
background: #428bca;
}

.irs--shiny .irs-bar--single {
Expand Down Expand Up @@ -228,7 +228,7 @@
color: #fff;
text-shadow: none;
padding: 1px 3px;
background-color: #337ab7;
background-color: #428bca;
border-radius: 3px;
font-size: 11px;
line-height: 1.333;
Expand Down
2 changes: 1 addition & 1 deletion inst/www/shared/ionrangeslider/scss/shiny.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ $font-family: $font-family-base !default;
// "High-level" coloring
$bg: $body-bg !default;
$fg: color-contrast($body-bg) !default;
$accent: $component-active-bg !default;
$accent: #428bca !default;

// "Low-level" coloring, borders, and fonts
$line_bg: linear-gradient(to bottom, mix($bg, $fg, 87%) -50%, $bg 150%) !default;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ index 00000000..ba052f8b
+ // "High-level" coloring
+ $bg: $body-bg !default;
+ $fg: color-contrast($body-bg) !default;
+ $accent: $component-active-bg !default;
+ $accent: #428bca !default;
+
+ // "Low-level" coloring, borders, and fonts
+ $line_bg: linear-gradient(to bottom, mix($bg, $fg, 87%) -50%, $bg 150%) !default;
Expand Down

0 comments on commit e089e73

Please sign in to comment.