4 ms·
I particularly liked the way tachyons does styling, in contrast to this. (http://tachyons.io/ http://tachyons.io/) ".ba" to add border all or ".bt" for border
by girishso 9y ago
I particularly liked the way tachyons does styling, in contrast to this. (http://tachyons.io/ http://tachyons.io/)
".ba" to add border all or ".bt" for border top... then just add ".b--dashed" for dashed border... ".georgia" will use Georgia font... ".red" will color it red.
Though class names they used can be more uniform IMO.
- extra88 9y agoWhy do you want to spend all your time editing your HTML, adding and removing classes in multiple places again and again, when you could just make one change in your CSS?
- plopz 9y agoWhats 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.
- SippinLean 9y agoFrom their examples: <article class="mw7 center ph3 ph5-ns tc br2 pv5 bg-washed-green dark-green mb5"> <a class="f6 br-pill bg-dark-green no-underline washed-green ba b--dark-green grow pv2 ph3 dib mr3"href="#">Sign Up</a> </article> ...I sure wouldn't want to maintain that site.
- goldenkey 9y agoyou fucknut. those sheets are meant to be inherited through sass not with the class names used directly on your html elements. dolt !