2 ms·
Totally agreed that Bootstrap styling-in-HTML sucks, but it was only ever pushed by Bootstrap, BEM and other things that are slowly going away. I build using C
by nailer 9y ago
Totally agreed that Bootstrap styling-in-HTML sucks, but it was only ever pushed by Bootstrap, BEM and other things that are slowly going away.
I build using CSS grid. Since there's no requirement for stylistic class names, I don't use them: instead I use the class names for what that item is.
Eg, to make a login box I use:
<div class="login">
.login {
@include center-in-parent;
background: $dark-background;
}
Rather than:
<div class="bootstrap-centered-dark-background-silly-styling-in-html">
As a result, when I change what login box looks like I change only my SCSS, rather than both the HTML and the SCSS.