Skip to content

Commit

Permalink
Use logical properties for margin and padding on facet layout
Browse files Browse the repository at this point in the history
This better supports rtl writing modes
  • Loading branch information
jcoyne committed Jun 13, 2024
1 parent b6c8d96 commit 943e723
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
10 changes: 5 additions & 5 deletions app/assets/stylesheets/blacklight/_facets.scss
Original file line number Diff line number Diff line change
Expand Up @@ -224,16 +224,16 @@ $facet-toggle-width: 1em !default;
$facet-toggle-height: $facet-toggle-width !default;

.facet-toggle-handle {
@extend .my-0;
@extend .py-0;
@extend .px-2;
margin-block: 0;
padding-block: 0;
padding-inline: 0.5rem;

// keep the icon span centered in the button, but shift to the left for equal spacing inside row
margin-left: -1 * $btn-padding-x;
margin-inline-start: -1 * $btn-padding-x;

.pivot-facet & {
// shift pivot values a little more aggressively for better compact display
margin-left: -2 * $btn-padding-x;
margin-inline-start: -2 * $btn-padding-x;
}

&.collapsed {
Expand Down
13 changes: 0 additions & 13 deletions app/assets/stylesheets/blacklight/build.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
@import "bootstrap/scss/mixins/breakpoints";
@import "bootstrap/scss/variables";

.py-2 {
padding-block: 0.5rem; /* https://github.com/projectblacklight/blacklight/pull/3186 */
}

/* These classes are all the BS things that Blacklight depends on (via @extend) */
.col-md-12 {
}
Expand Down Expand Up @@ -38,12 +34,6 @@ h5 {
.h6 {
}

.list-unstyled {
}

.d-flex {
}

.my-0 {
}

Expand All @@ -58,7 +48,4 @@ h5 {
.px-4 {
}

.text-muted {
}

@import "blacklight";

0 comments on commit 943e723

Please sign in to comment.