Last active
September 4, 2017 21:30
-
-
Save SylarRuby/20795df837cabe0ac0275c6420f2ad9b to your computer and use it in GitHub Desktop.
BEM SASS Demo
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
/* | |
* .navbar is the name of our component | |
* | |
*/ | |
.navbar { | |
height: 90px; | |
// .navbar__container | |
&__container { | |
display: flex; | |
align-items: center; | |
justify-content: space-between; | |
// We could vertical align this. | |
} | |
// We could have nested below inside "&__container", but | |
// I do not ususally go that deep | |
&__container__logo { | |
text-align: left; | |
// Now I will go deep | |
&--svg { | |
// your style for logo | |
} | |
} | |
&__container__links { | |
text-align: right; | |
&--home { | |
// style for a.navbar__container__links--home | |
} | |
} | |
// Media Queries | |
@media all and (max-width: 768px) { | |
// We are already inside our ".navbar" element | |
&__container { | |
flex-direction: column; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment