Hacker News new | past | comments | ask | show | jobs | submit login

In my opinion this is still the best option for CSS, especially in combination with React.

http://tachyons.io/

Most importantly it contains a ratio-based scale: http://tachyons.io/docs/layout/spacing/




Geez. Those selectors.. "<footer class="pv4 ph3 ph5-m ph6-l mid-gray">"


It's definitely weird at first, but the aim of atomic CSS is to not have a CSS file that just grows and grows and grows.

This article(written by the creator of Tachyons) helps to explain the issue: http://mrmrs.io/writing/2016/03/24/scalable-css/

Where I work, we're using it on a new project and while it definitely requires a lot of learning(and just generally understanding CSS), it's faster to debug with, easier to take care of edge cases, and the total size for our app is incredibly small.


It is a bit weird to use at first but I highly recommend giving it a shot.

I've built some complex UI's with the same class name styles (Basscss). 99% of the time I'm reusing classes and I don't have to write anything custom.

Prototyping is great once you memorize the classnames.. Just write HTML, no need to switch to CSS files.

If you're working with global styles this is by far the most scalable CSS methodology as of right now IMO.


"...once you memorize the classnames"

I don't know which editor you are using, but for TextMate I've written a 20 line-plugin that greps the tachyons.css file and gives me code-completion.

http://postimg.org/image/tq038rwqp/


As others have said it's very strange at first. My co-worker introduced it to me a little over a month ago and I remember thinking "how is this maintainable?". After a few hours it started to make sense and now I can't imagine going back to BEM.

Being able to design UIs without opening a single CSS file has made HTML pretty fun and I've found I'm much better at componentizing the right things.


Is it possible to use semantic class names then use a CSS processor to map those into tachyon classes?


Why would you do that?


It would decouple your structure(html) from your display(css). The semantic class applied to your html could remain unchanged while you are changing the style. For example, you could switch from using a css library like tachyon, to swapping it out with a custom css without touching your html/templates. You're right though, it is an extra layer of abstraction that might not be needed.


May I suggest susy grids and using fully semantic selectors, with zero CSS cruft?

It's a grid system, not framework, so it adapts to what you need.


I love it, these are elements I can use. Now... I guess I should read the docs, how to make my own or compose them.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: