-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix no-js layout for drawer and product count position #1572
Changes from all commits
ad6861a
df52f3c
072b344
9a427e3
e4ade8f
7a222b0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -992,11 +992,11 @@ input.mobile-facets__checkbox { | |
padding-right: 3rem; | ||
} | ||
|
||
.js .facets-vertical .facets-wrapper.no-filter { | ||
.facets-vertical .facets-wrapper--no-filters { | ||
display: none; | ||
} | ||
|
||
.no-js .facets-vertical .facets-wrapper.no-filter { | ||
.no-js .facets-vertical .facets-wrapper--no-filters { | ||
display: block; | ||
} | ||
|
||
|
@@ -1040,8 +1040,9 @@ input.mobile-facets__checkbox { | |
margin-bottom: 1.5rem; | ||
} | ||
|
||
.facets-vertical .facet-filters.sorting.no-js { | ||
.no-js .facets-vertical .facet-filters.sorting { | ||
padding-left: 0; | ||
flex-direction: column; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I chose to move |
||
|
||
.facets-vertical .facet-checkbox input[type='checkbox'] { | ||
|
@@ -1069,27 +1070,17 @@ input.mobile-facets__checkbox { | |
.facets-container-drawer { | ||
display: flex;; | ||
flex-flow: row wrap; | ||
align-items: center; | ||
column-gap: 0; | ||
} | ||
|
||
.facets-container-drawer .mobile-facets__wrapper { | ||
margin-right: 2rem; | ||
flex-grow: 1; | ||
} | ||
|
||
.facets-container-drawer .product-count { | ||
align-self: flex-start; | ||
} | ||
|
||
.facets-container-drawer .mobile-facets__wrapper { | ||
width: calc(40% - 2rem); | ||
} | ||
|
||
.facets-container-drawer .facets { | ||
width: 40%; | ||
} | ||
|
||
.facets-container-drawer .product-count { | ||
width: 20%; | ||
margin:0 0 0.5rem 3.5rem; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @melissaperreault This should fix the Drawer Product count alignment. |
||
} | ||
|
||
.facets-container-drawer .facets-pill { | ||
|
@@ -1100,18 +1091,6 @@ input.mobile-facets__checkbox { | |
.facets-container-drawer .facets__form { | ||
display: block; | ||
} | ||
|
||
.no-js .facets-container-drawer .mobile-facets__wrapper { | ||
width: calc(20% - 2rem); | ||
} | ||
|
||
.no-js .facets-container-drawer .facets { | ||
width: 60%; | ||
} | ||
|
||
.no-js .facets-container-drawer .product-count { | ||
width: 20%; | ||
} | ||
} | ||
|
||
@media screen and (min-width: 750px) and (max-width: 989px) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my testing, the added specificity was not required, so I used a modifier and removed the
.js
class from the first style declaration.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 also if the
.no-filter
class isn't meant to be added/removed to reflect a state change (which seems to be the case here), it's better to use a modifier like you did.