Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> How do you remember the names of all your classes?

You don't.

https://tailwindcss.com/docs/extracting-components



So, the dev never reads/modifies the extracted component that still uses hard-to-read hard-to-typecheck classes? Doesn't seem like a good solution.


It’s a great solution. Every class only maps to one css property setting, and they are very well named.

Thus not much more difficult to read and remember than css key value pairs.

Why would you typecheck component class names? If so, its all strings, seems pretty easy less error prone than inline styles.


Actually each class does NOT always map to a single property. In what I consider to be its greatest strength each class is actually designed to do some very specific thing that can actually require multiple CSS properties and settings. For eg the breakpoint classes are fairly complex but allow you incredible flexibility in building responsive UIs




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

Search: