Skip to content

Commit

Permalink
Put the facet heading padding in a variable
Browse files Browse the repository at this point in the history
This makes it easier to customize
  • Loading branch information
jcoyne committed Dec 18, 2024
1 parent cba1179 commit e9a920e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
20 changes: 11 additions & 9 deletions app/assets/builds/blacklight.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@
white-space: nowrap;
}

.modal[open] {
dialog.modal[open] {
display: block;
background: none;
border: none;
max-height: unset;
max-width: unset;
}

/* Generic layout stuff */
Expand Down Expand Up @@ -88,9 +90,6 @@ main {
margin-left: 0.25rem;
transition: background-color 0.15s ease-in-out;
}
.applied-filter .constraint-value:hover .filter-name:after {
background-color: var(--bs-btn-hover-color);
}
.applied-filter .remove {
--bs-btn-hover-bg: var(--bl-constraint-remove-hover-bg);
--bs-btn-hover-border-color: var(--bl-constraint-remove-hover-border-color);
Expand Down Expand Up @@ -245,6 +244,10 @@ main {
--bl-facet-active-bg: var(--bs-success);
--bl-facet-active-item-color: var(--bs-success);
--bl-facet-remove-color: var(--bs-secondary-color);
--bl-facet-remove-hover-color: var(--bs-danger);
--bl-facet-label-indent: -15px;
--bl-facet-label-padding-left: 15px;
--bl-facet-header-padding-y: 0.5rem;
}
.sidenav .facet-toggle-button [data-hide-label] {
display: inline;
Expand Down Expand Up @@ -280,8 +283,7 @@ main {
.facets-header {
display: flex;
justify-content: space-between;
padding-bottom: 0.5rem;
padding-top: 0.5rem;
padding-block: var(--bl-facet-header-padding-y);
}

.facets-heading {
Expand Down Expand Up @@ -326,15 +328,15 @@ main {
text-decoration: none;
}
.facet-values .remove:hover {
color: #dc3545;
color: var(--bl-facet-remove-hover-color);
text-decoration: none;
}
.facet-values .facet-label {
hyphens: auto;
overflow-wrap: break-word;
padding-left: 15px;
padding-left: var(--bl-facet-label-padding-left);
padding-right: 1em;
text-indent: -15px;
text-indent: var(--bl-facet-label-indent);
}
.facet-values .facet-count {
margin-left: auto;
Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/blacklight/_facets.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
--bl-facet-remove-hover-color: var(--bs-danger);
--bl-facet-label-indent: -15px;
--bl-facet-label-padding-left: 15px;
--bl-facet-header-padding-y: 0.5rem;

.facet-toggle-button {
[data-hide-label] {
Expand Down Expand Up @@ -52,8 +53,7 @@
.facets-header {
display: flex;
justify-content: space-between;
padding-bottom: 0.5rem;
padding-top: 0.5rem;
padding-block: var(--bl-facet-header-padding-y);
}

.facets-heading {
Expand Down

0 comments on commit e9a920e

Please sign in to comment.