4 ms·
functional css is basically anti design system. Some will deny it and claim that they do have a design system implemented in functional css, but really all they
by nsonha 5y ago
functional css is basically anti design system. Some will deny it and claim that they do have a design system implemented in functional css, but really all they do is adding a redundant layer between css and their design system.
- wildrhythms 5y agoWhat do you mean? There is nothing special about naming classes and grouping styles together that is exclusive to a design system. I work at a well-known tech company and we have many projects using the same Tailwind configuration, and an entire components/ file with .jsx components. No need for making up arbitrary class names.
- nsonha 5y ago> No need for making up arbitrary class names. in a design system no reusable classname is abitrary, they should all mean something in your design language. If you find yourself reusing arbitrary classname, then that's just... writing css, not using a design system. the idea of the design system is that you compose from what in your design system exclusively. This is to prevent ad-hoc slyling that goes outside established patterns. If you are just going to compose generic css then there is no point. I never had to name any class because I use styled-components. Either the style is part of my design system, then it has a name, the component name, or it's just ad-hoc css, that I don't export. I don't reuse that kind of thing. The tailwind way is you try to reuse & compose bits of the ad-hoc css by having generic, arbitrary classnames that you don't write but provided by a library