Created
June 6, 2021 23:09
-
-
Save salexzee/ec0147ccda49078ee4e9205d152210d2 to your computer and use it in GitHub Desktop.
SCSS from my predictive search YouTube tutorial video.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.top-bar__search { | |
position: relative; | |
} | |
.predictive-search { | |
background-color: #ffffff; | |
border: 1px solid #ababab; | |
border-radius: 2px; | |
left: 0; | |
opacity: 0; | |
position: absolute; | |
top: calc(100% + 2px); | |
transform: translateY(-10px); | |
transition-duration: 250ms; | |
visibility: hidden; | |
width: 350px; | |
z-index: 500; | |
&.is-showing { | |
opacity: 1; | |
transform: translateY(0); | |
visibility: visible; | |
} | |
} | |
.predictive-search__product { | |
align-items: center; | |
border-bottom: 1px solid #ababab; | |
display: flex; | |
justify-content: space-between; | |
padding: 10px; | |
width: 100%; | |
&:last-child { | |
border-bottom: 0; | |
} | |
img { | |
width: 20%; | |
} | |
h2 { | |
font-size: 14px; | |
margin-bottom: 0; | |
overflow: hidden; | |
text-overflow: ellipsis; | |
white-space: nowrap; | |
width: 50%; | |
} | |
span { | |
font-size: 14px; | |
width: 20%; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment