4 ms·
> I decide to change the color of "gray-700", since those colors come from a configuration, I only need to change it in my configuration. This sounds like a bo
by legostormtroopr 7y ago
> I decide to change the color of "gray-700", since those colors come from a configuration, I only need to change it in my configuration.
This sounds like a boldRedText pattern to me [1]. I get the idea of adding utility classes that inherit the base classes, but altering the definition of the "gray" class to be some other color feels wrong.
[1] http://thecodelesscode.com/case/95 http://thecodelesscode.com/case/95
- dwild 7y agogray-700 isn't really 70% gray though, it's a darker gray than gray-600 and a lighter gray than gray-800. It also contains a bit more blue in it, which is actually quite common to do with gray. In reality I'm pretty sure that you wouldn't alter it directly either and that if you do, you would try to keep the 10 versions of it somewhat linear, or at least consistent with the use that you do of it. Theses colors are there for prototyping quickly yet still offering good looking result. Sure "color: gray" works, but look at the colors choices [1], it's much better than the default gray and offer more choice than lightgray, gray and darkgray without having to do math over #808080. [1] https://tailwindcss.com/docs/customizing-colors/#default-color-palette https://tailwindcss.com/docs/customizing-colors/#default-col...