Skip to content

Commit

Permalink
Add a variable to target facet spacing
Browse files Browse the repository at this point in the history
This allows adopters to easily customize this spacing without affecting the global spacing
  • Loading branch information
jcoyne committed Aug 5, 2024
1 parent 278cc49 commit 2b50404
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions app/assets/stylesheets/blacklight/_facets.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.sidenav {
--bl-facets-smallish-padding: .25rem;
--bl-facets-smallish-border: var(--bs-border-width) solid var(--bs-border-color);
--bl-facets-smallish-padding: 0.25rem;
--bl-facets-smallish-border: var(--bs-border-width) solid
var(--bs-border-color);
--bl-facets-smallish-margin-bottom: #{$spacer};
--bl-facets-smallish-border-radius: #{$border-radius};

Expand Down Expand Up @@ -39,14 +40,12 @@
$next: breakpoint-next($breakpoint, $grid-breakpoints);
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);


&#{$infix} {
@include media-breakpoint-down($next) {
border: var(--bl-facets-smallish-border);
padding: var(--bl-facets-smallish-padding);
margin-bottom: var(--bl-facets-smallish-margin-bottom);
border-radius: var(--bl-facets-smallish-border-radius);

}
@include media-breakpoint-up($next) {
// scss-lint:disable ImportantRule
Expand Down Expand Up @@ -100,11 +99,16 @@
line-height: inherit;
}

:root {
--bl-facet-limit-margin: $spacer;
--bl-facet-limit-body-padding: $spacer;
}

.facet-limit {
margin-bottom: $spacer;
margin-bottom: var(--bl-facet-limit-margin);

.card-body {
padding: $spacer;
padding: var(--bl-facet-limit-body-padding);
}
}

Expand Down Expand Up @@ -168,7 +172,7 @@
}

.facet-count {
margin-left: auto
margin-left: auto;
}

.facet-checkbox {
Expand All @@ -194,7 +198,7 @@
}

/* This prevents the contained stretch link from covering the panel body */
position: relative
position: relative;
}

/* Sidenav
Expand Down

0 comments on commit 2b50404

Please sign in to comment.