3 ms·
> How do you remember the names of all your classes? You don't. https://tailwindcss.com/docs/extracting-components https://tailwindcss.com/docs/extracting-com
by leadingthenet 6y ago
> How do you remember the names of all your classes?
You don't.
https://tailwindcss.com/docs/extracting-components https://tailwindcss.com/docs/extracting-components
- welder 6y agoSo, 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.
- gervwyk 6y agoIt’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.
- aniforprez 6y agoActually 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