Skip to content

Commit

Permalink
Allow active facet header color to be set with a css property
Browse files Browse the repository at this point in the history
Fixes #3174
  • Loading branch information
jcoyne committed Sep 18, 2024
1 parent c9800f1 commit f01e129
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
11 changes: 1 addition & 10 deletions app/assets/stylesheets/blacklight/_facets.scss
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,8 @@
border-color: $facet-active-border;

.card-header {
--bs-btn-color: #{$facet-active-header-color};
background-color: var(--bl-facet-active-bg);

.btn {
@if function-exists(color-contrast) {
color: color-contrast($facet-active-bg);
}

@if function-exists(color-yiq) {
color: color-yiq($facet-active-bg);
}
}
}
}

Expand Down
9 changes: 9 additions & 0 deletions app/assets/stylesheets/blacklight/blacklight_defaults.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ $logo-height: 50px !default;
$facet-active-border: $success !default;
$facet-active-bg: $success !default;
$facet-active-item-color: $success !default;
$facet-active-header-color: $black;
/* Bootstrap 5+ */
@if function-exists(color-contrast) {
$facet-active-header-color: color-contrast($facet-active-bg);
}
/* Bootstrap 4 */
@if function-exists(color-yiq) {
$facet-active-header-color: color-yiq($facet-active-bg);
}

/* for compatability with BS < 5.3 */
$body-secondary-color: rgba($body-color, 0.75) !default;
Expand Down

0 comments on commit f01e129

Please sign in to comment.