Skip to content

Instantly share code, notes, and snippets.

@t-laird
Created February 20, 2018 19:43
Show Gist options
  • Save t-laird/ce629f75310cab8793fb218bf993f169 to your computer and use it in GitHub Desktop.
Save t-laird/ce629f75310cab8793fb218bf993f169 to your computer and use it in GitHub Desktop.
$accentTertiary: #d1d2d3;
$accentSecondary: #f2f2f2;
.header {
.header__header {
display: grid;
grid-template-columns: auto 1fr;
align-items: center;
margin-bottom: 50px;
h4 {
padding-right: 40px;
}
.header__header__seperator {
border-bottom: 1px solid $accentTertiary;
}
}
nav {
background: $accentTertiary;
display: grid;
grid-template-columns: 80px 1fr 200px;
grid-template-rows: 100px;
grid-gap: 30px;
align-content: center;
align-items: center;
.header__main {
padding: 15px 0px 15px 20px;
img {
width: 100%;
}
h3 {
display: none;
}
}
.header__nav__links {
display: grid;
grid-template-columns: repeat(3, 1fr);
div {
cursor: pointer;
text-align: center;
}
}
.header__nav__search {
display: grid;
grid-template-columns: 20px 1fr;
grid-gap: 10px;
background: $accentSecondary;
align-items: center;
padding: 0px 5px;
border: 1px solid darkgrey;;
margin-right: 20px;
input {
width: 100%;
height: 40px;
border: none;
background: none;
font-size: 18px;
font-weight: 100;
}
}
}
}
@media screen and (max-width: 850px) {
.header {
nav {
.header__nav__links {
div {
font-size: 12px;
}
}
}
}
}
@media screen and (max-width: 750px) {
.header {
&.closed {
nav {
.header__nav__links {
display: none;
}
.header__nav__search {
display: none;
}
}
}
nav {
grid-template-columns: 1fr;
grid-template-rows: auto;
.header__main {
display: flex;
justify-content: space-between;
height: 80px;
align-items: center;
cursor: pointer;
background: darken($accentTertiary, 10%);
img {
width: 70px;
}
h3 {
display: inline;
margin-right: 20px;
color: rgb(70, 70, 70);
}
}
.header__nav__links {
grid-template-columns: 1fr;
grid-gap: 40px;
div {
font-size: 20px;
padding-left: 30px;
text-align: left;
}
}
.header__nav__search {
margin: 0px 10px 6px;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment