Skip to content

Commit

Permalink
A few small css changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jas7457 committed Oct 16, 2023
1 parent df6efbe commit fbd31e2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
26 changes: 14 additions & 12 deletions assets/component-facets.css
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,19 @@
align-items: flex-start;
}

.facets-layout-grid .visual-display-parent {
display: flex;
flex-direction: column;
gap: 0.8rem;
padding: 0;
height: 100%;
font-size: 1.3rem;
}

.facets-layout-grid .visual-display-parent--thumbnail {
padding-bottom: 0.8rem;
}

.facets-layout-grid .visual-display--style-thumbnail {
--visual-display__size: 100%;
}
Expand All @@ -325,7 +338,7 @@
}

/* Hover, active, and focus states */
:where(.facets__label:hover, .facets__label.active, .facets__label:has(:focus-visible)) {
:is(.facets__label:hover, .facets__label.active, .facets__label:has(:focus-visible)) {
color: rgba(var(--color-foreground), 1);
}

Expand Down Expand Up @@ -398,12 +411,6 @@
}
}

.visual-display-parent.facets__label {
display: flex;
flex-direction: column;
gap: 0.8rem;
}

.facet-checkbox--disabled,
.mobile-facets__label--disabled {
opacity: 0.4;
Expand Down Expand Up @@ -981,11 +988,6 @@ input.mobile-facets__checkbox {
padding-right: 1.5rem;
}

.visual-display-parent {
padding: 0;
height: 100%;
}

.product-count {
align-self: center;
position: relative;
Expand Down
9 changes: 4 additions & 5 deletions assets/component-visual-display.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
--visual-display__size: min(2.4rem, 100%);
position: relative;
width: var(--visual-display__size);
max-width: 100%;
border: 0.1rem solid rgba(var(--color-foreground), 0.2);
aspect-ratio: 1/1;
}
Expand All @@ -19,9 +20,6 @@

.visual-display--style-thumbnail {
--visual-display__size: min(9rem, 100%);

border-radius: var(--buttons-radius);
overflow: hidden;
}

.visual-display-parent .visual-display--style-swatch,
Expand All @@ -34,15 +32,16 @@
}

/* Hover, active, and focus states */
:where(
:is(
.visual-display-parent:hover .visual-display--style-swatch,
.visual-display-parent.active .visual-display--style-swatch,
.visual-display-parent:has(:focus-visible) .visual-display--style-swatch,
.visual-display-parent--thumbnail:hover,
.visual-display-parent--thumbnail.active,
.visual-display-parent--thumbnail:has(:focus-visible)
) {
outline: 0 solid rgb(var(--color-foreground));
outline-style: solid;
outline-color: rgb(var(--color-foreground));
}

/* Active state */
Expand Down

0 comments on commit fbd31e2

Please sign in to comment.