4 ms·
But how is class="border-solid border-black" better than style="border:solid black"? It's hard to imagine that you'll change the border-black or border-solid cl
by ghusbands 3y ago
But how is class="border-solid border-black" better than style="border:solid black"? It's hard to imagine that you'll change the border-black or border-solid classes to do something else, so some is clearly just a different inline style.
- tesdinger 3y agoYou can change the class to be white and then say it's for historical reasons later.
- ponderings 3y agoPeople do that (not me) because you can easily change all elements that have that specific border type. You might change the radius or thickness, could add an outline or at least see what it looks like applied to everything. border-solid wont change but it follows the same approach for consistency.
- doubleorseven 3y agoBorder-solid can indeed be inlined but black is a color i think not all agreed on. I like #252325 but some will go for #030303. Also, it's like building your new and shiny app with i18n in mind. Do you really need translations when you are the only user? Probably not, but development is also about trying to predict what will happen next. classes helps you to grow.
- throwaway167 3y ago'black' is a named web colour, no? In 1999. #000000 [1] Or aside from re-writing standards, I don't get the point about translations. I go for classes on elements, like <h1> h1: var(--c0-b); That means colours can be swapped around like an i18n language, by changing the palette that sits in the CSS file. Putting 'black' inline be it in actual inline css. or pseudo inline css that seems to be the case with the library here, is the exact opposite of an analogy to i18n in mind and seems a great step back, back to pre stylesheet days, in the power of abstraction. [1] https://www.w3.org/TR/REC-html40/types.html#h-6.5 https://www.w3.org/TR/REC-html40/types.html#h-6.5