3 ms·
Tachyons, which I like a lot, is Atomic CSS, which means essentially things do what they say, like .red makes things red, or .ma0 sets a margin of 0. With Tach
by pdfernhout 6y ago
Tachyons, which I like a lot, is Atomic CSS, which means essentially things do what they say, like .red makes things red, or .ma0 sets a margin of 0. With Tachyons, you can define any look you want by adding these atomic styles to HTML elements. While that might be a lot of work if you style HTML by hand, it is not much of a chore if you are writing JavaScript code which defines widgets which you use by calling a function (like using Mithril, a favorite vdom UI building library). Occasionally you may use inline styles, or add some new atomic styles, or change existing Tachyons styles (like set a different shade of .red) to get a precise look -- but for the most part, Tachyons styles cover most common cases.
By contrast (and not having used it) new.css seems to provide some basic styling to give some elements like input or summary a certain look which you may or may not like. New.css seems like a very lightweight (CSS-only) Bootstrap framework. If you don't like the specific look (including colors and margins) the designer chose for you, there is apparently no easy way to change it or go beyond it -- other than by the usual mechanisms of writing more CSS.
I like the Atomic CSS approach because, for what I do (mainly single-page apps) I just write JavaScript which generates HTML which is almost-entirely styled using existing Tachyons classes (which never collide). By contrast, most other CSS libraries (such as apparently new.css) expect you to write new CSS styles for HTML elements and also semantic CSS classes (e.g. .main-content) if you need something other than exactly what they provided, and so you have to be managing multiple stylesheets and their collisions.
See also: https://css-tricks.com/lets-define-exactly-atomic-css/ https://css-tricks.com/lets-define-exactly-atomic-css/
- StreamBright 6y agoThanks a million! Now I understand much better. We are using Tachyons and going to keep using it.