This was written in 2017. I now use Prettier to automatically enforce consistent styles.
After reading all the style guides referenced in this css-tricks article I have created my own style guide.
.classnameExample {
// mobile version of classnameExample
@include span(12);
height: 300px;
// desktop version of classnameExample
@include breakpoint(sm){
@include span(6);
&:last-of-type {
@include last;
}
}
// Modifiers
&--light {
background-color: $white;
color: $black;
}
// Parent wrapper
&__wrapper {
background: $primary;
}
// Children and grandchildren in order of HTML
&__inner {
@include span(12);
position: relative;
}
&__logo {
position: absolute;
bottom: 0;
right: 0;
}
}