3 ms·
Naming things is notoriously hard, but it's a skill you need to master to make reusable things. You name things that repeat. Think of function names in JavaScri
by tipiirai 3y ago
Naming things is notoriously hard, but it's a skill you need to master to make reusable things. You name things that repeat. Think of function names in JavaScript, class names in object-oriented languages, or component names in Figma.
- nrk9819 3y agoas a designer, ability of naming thing is extremely crucial regardless of how hard it is. As you mentioned figma, I agree that not just the components, but also frames should be named properly.
- meowtimemania 3y agoIdeally we shouldn’t have to name things that are never reused. Often class names are only ever used once. There isn’t much benefit in naming the class.
- M4v3R 3y agoYeah, this is exactly my point. I still need to name my reusable components, but I don’t need to name every single html element I want to style.
- tipiirai 3y agoYou only need to name the top-level element. Others can be styled with CSS selectors. Nesting is supported with Lightning CSS today.
- angio 3y agoYou can still name things in Tailwind + React (create a new component or variant), what changes is that if I need to add a 10px margin on the right I don't have to create a new component (like when using styled components), I simply override `className` and move on.
- jonwinstanley 3y agoTailwind lets you stick to just naming your components, don't bother trying to give names to all the re-usable sets of styles
- fortyseven 3y agoOh, hey, look! A name!