4 ms·
I liked basscss in principle, but I feel like the following examples from the homepage are missing the point/ will lead to un-maintainable code. <h2 class="h
by ninjaranter 9y ago
I liked basscss in principle, but I feel like the following examples from the homepage are missing the point/ will lead to un-maintainable code.
<h2 class="h1">Larger than default h2 style, but semantically correct</h2>
... why not just use a h1?
I also don't see how
<p class="bold text-decoration-none caps">Bold</p>
is a big step up from doing
<p style="font-weight: bold; text-transform: uppercase; text-decoration: none">Bold</p>
Am I missing the appeal here?
- lioeters 9y agoAs for the second point, at least how I use it, is that I can create a higher-order class from those "atomic" classes like bold, etc. So I'd do in Sass: .paragraph--emphasize { @extend .bold, .text-decoration-none, .caps; } Then apply that class on the paragraph. This way, the resulting CSS is very compact: the above gets compiled so that the higher-order class uses the same styles as the atoms that compose it.
- raulk 9y ago> ... why not just use a h1? Because the HTML tags you choose affect document structure and SEO. CSS classes don't; they only affect aesthetics.
- randomsofr 9y ago> <h2 class="h1"> wow, i just threw up in my mouth