5 ms·
There are lots of positive comments in this thread in support of this approach and I think it's great when anyone challenges the status quo. It is more common
by martinbooth 7y ago
There are lots of positive comments in this thread in support of this approach and I think it's great when anyone challenges the status quo.
It is more common these days than it was for websites to support multiple styles/layouts. Whether that's because they're responsive or because they allow you to enable dark mode or because they support rtl layouts. Class names such as text-dark-soft or align-right will be misleading if text-dark-soft ends up closer to white and align-right is left aligned as a website is evolved to support these features.
Not a criticism of this approach; this is easily fixed by using names such as text-emphasized-soft or align-start (for example), just pointing out the examples in this article could be lead to problems
CSS variables can also be used to encourage picking colors or padding/margin from a curated list. The approach in this article is not required to solve that problem