Created
August 10, 2018 01:48
-
-
Save greyscaled/0664d95473b56e85e46b0f306cecb8a2 to your computer and use it in GitHub Desktop.
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
.navigation { | |
// ... | |
&__hamburger { | |
margin-top: 2rem; // middle line 'meat' of burger | |
position: relative; | |
// this sets the style for all 3 lines | |
&, | |
&::before, | |
&::after { | |
// same hamburger-box width | |
width: 4rem; | |
height: 2px; | |
// make sure each is its own line | |
display: block; | |
background-color: #FFF; | |
} | |
// set content so they actually render | |
// set to absolute so we can position relative to middle line | |
&::before, | |
&::after { | |
content: ""; | |
position: absolute; | |
} | |
// position each line relative to middle | |
&::before { top: -2rem; } | |
&::after { top: 2rem; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment