-
Notifications
You must be signed in to change notification settings - Fork 158
7470/7474 relocate search bar #7591
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
Changes from all commits
10a2e64
a503b4c
eeab8e7
f4cc79e
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 |
|---|---|---|
|
|
@@ -29,11 +29,15 @@ body.catalog { | |
|
|
||
| .intro-text { | ||
| padding-top: 12px; | ||
| padding-bottom: 28px; | ||
| padding-bottom: var(--search-box-height-mobile); | ||
|
|
||
| @media (min-width: $breakpoint) { | ||
|
Collaborator
Author
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. Added a new breakpoint for the MD size, since the category navigation would cover the search bar. |
||
| padding-top: 12px; | ||
| padding-bottom: calc(var(--search-box-height-desktop) + 90px); | ||
| } | ||
| @media (min-width: $hero-breakpoint) { | ||
| padding-top: 90px; | ||
| padding-bottom: 90px; | ||
| padding-bottom: calc(var(--search-box-height-desktop) + 90px); | ||
|
Collaborator
Author
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. Made room for the search bar by taking the existing 90px of padding and adding the size of the search bar. |
||
| } | ||
| } | ||
|
|
||
|
|
@@ -56,11 +60,7 @@ body.catalog { | |
| } | ||
|
|
||
| #product-filter-search { | ||
| --initial-width: calc( | ||
| 100% - calc(var(--clear-icon-size) + var(--search-icon-size-desktop)) | ||
| ); | ||
| --expanded-width: var(--initial-width); | ||
|
|
||
| background-color: $white; | ||
| cursor: pointer; | ||
| position: relative; | ||
| display: flex; | ||
|
|
@@ -75,17 +75,12 @@ body.catalog { | |
|
|
||
| @media (min-width: $bp-md) { | ||
| --container-padding: 0.5em; | ||
| --initial-width: calc( | ||
| 3 * var(--container-padding) + var(--search-icon-size-desktop) | ||
| ); | ||
| --expanded-width: calc(100% - var(--pni-checkbox-container-width) - 2em); | ||
|
|
||
| position: absolute; | ||
| left: 0; | ||
| border: 1px solid transparent; | ||
| padding: var(--container-padding); | ||
| padding-right: 1em; | ||
| width: var(--initial-width); | ||
| height: var(--search-box-height-desktop); | ||
| overflow: hidden; | ||
|
|
||
|
|
@@ -103,10 +98,6 @@ body.catalog { | |
| border-color: $black; | ||
| cursor: default; | ||
|
|
||
| @media (min-width: $bp-md) { | ||
| width: var(--expanded-width); | ||
| } | ||
|
|
||
| .search-icon { | ||
| cursor: default; | ||
| } | ||
|
|
@@ -172,14 +163,15 @@ body.catalog { | |
| user-select: none; | ||
| position: absolute; | ||
| left: 0; | ||
| padding-top: 0.5em; | ||
| top: calc(var(--sticky-height) + var(--mobile-creep-offset)); | ||
|
|
||
| @media (min-width: $bp-md) { | ||
| left: unset; | ||
| right: 0; | ||
| margin-left: 0.5em; | ||
| width: var(--pni-checkbox-container-width); | ||
| font-size: 100%; | ||
| top: unset; | ||
| } | ||
|
|
||
| input[type="checkbox"] { | ||
|
|
@@ -356,7 +348,13 @@ body.catalog { | |
| ); | ||
|
|
||
| &.creep-o-meter-moved { | ||
| height: var(--small-sticky-height); | ||
| height: 80px; | ||
|
Collaborator
Author
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. |
||
|
|
||
| @media (max-width: $bp-md) { | ||
| #product-filter-pni { | ||
| top: calc(var(--mobile-creep-offset)); | ||
| } | ||
| } | ||
| } | ||
|
|
||
| @media (min-width: $breakpoint) { | ||
|
|
@@ -373,20 +371,19 @@ body.catalog { | |
| .creep-o-meter-information { | ||
| position: absolute; | ||
| white-space: nowrap; | ||
| top: calc(var(--sticky-height) + var(--mobile-creep-offset)); | ||
| right: 0; | ||
| left: 0; | ||
| opacity: 1; | ||
| transition: opacity 0.2s ease; | ||
| top: unset; | ||
| right: calc(50% - 36px); | ||
| left: unset; | ||
|
|
||
| &.fade-out { | ||
| opacity: 0; | ||
| } | ||
|
|
||
| @media (min-width: $bp-md) { | ||
| top: unset; | ||
| right: calc(50% - 36px); | ||
| left: unset; | ||
| @media (max-width: $bp-sm) { | ||
| right: calc(50% - 144px); | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -484,6 +481,7 @@ body.catalog { | |
| .oh-no-face { | ||
| width: 50px; | ||
| height: 50px; | ||
| margin: auto; | ||
|
Collaborator
Author
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. This is a minor fix to a bug I found while working on this ticket, where if you were to search and no results appeared, the "oh no" face would be all the way to the left of the page. The margin makes sure its at center :D |
||
| } | ||
| @media (min-width: $breakpoint) { | ||
| .oh-no-face { | ||
|
|
||


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.
Since the search bar is no longer collapsing/expanding, we no longer needed this section of the javascript file which would add classes/ move the face icon when the search bar was expanded/ replace it if the search bar was collapsed again.
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.
so nice to be able to remove code here.