2 ms·
Whats the benefit of tachyons over just writing inline styles?
by plopz 9y ago
Whats the benefit of tachyons over just writing inline styles?
- losvedir 9y agoThe author discusses it a bit here: https://github.com/tachyons-css/tachyons/issues/12 https://github.com/tachyons-css/tachyons/issues/12 The key points from there, regarding your question specifically: 1) inline styles can't use media queries, while there are tachyon classes for different devices. 2) Ditto for pseudo classes. 3) The browser renders them faster. But I think your actual question was something more along the lines of "isn't styling individual elements considered bad practice?" That has a bigger answer and is more philosophical. I, too, recoil at it, but I'm open to best practices changing or being considered differently in the context of web applications vs web pages. For example, react and JSX changed my mind about mixing JS and markup and even styling to some extent.
- SippinLean 9y ago>I, too, recoil at it But you're recommending this? This has advantages over inline styles, but doesn't avoid the main drawback of using them: difficulty to maintain and change.