|
|
|
|
|
by hunterb123
1729 days ago
|
|
> try doing that inline.... My point was the end result is the same as inline, yes it's less verbose than inline but it's more obscure unless you have all the shorthand class names memorized. It's just a messy string, can you even make that type safe? > and i don't have to dig thru some other css file That's a separate issue solved via CSS-in-JS in general. I believe your styles should be isolated to your component, preferably in the same file, not global. That doesn't mean we have to shove styling in the className string attribute. |
|
It's not the same as inline styles because it expresses things that inline styles fundamentally cannot. Inline styles don't have media queries or selectors.
> It's just a messy string, can you even make that type safe?
WTF? Is any other HTML class string typesafe?