4 ms·
Have you tried it? I don't know what you mean by "sign of dementia", but I find the approach taken by tailwind makes me a lot more successful in applying design
by jakeva 5y ago
Have you tried it? I don't know what you mean by "sign of dementia", but I find the approach taken by tailwind makes me a lot more successful in applying designs. Doesn't feel like dementia to me.
- sam0x17 5y agoIf I go to it and it has react-specific crap all over it, I hit the back button
- TheGeminon 5y agoWhat React-specific stuff does Tailwind have? It's a purely CSS framework.
- sam0x17 5y agoLet me rephrase. If I go to something and I see npm, I hit the back button.
- hnedeotes 5y agoYes I did, that's why I'm of that opinion. What it does is force you, as other frameworks, to learn all its intricacies, design decisions, use an heavy and complex development environment (that besides that reads files it doesn't have anything to go about reading?) so that you don't need to learn the underlying language. Then it nudges you to write a soup of classes (that you need to learn, and need to learn the config because it seems by default it has -400 but not -500, or whatever, and need to learn their priorities), that you need to keep changing and copying pasting (yes you can write classes that coalesce your styling... but that's kinda the point of CSS and/or any other pre-processor), and forget about semantically marking your html. (I'm not saying you have to write it badly, it's just that writing it poorly seems much easier - and is the same with CSS). I just don't see the point - with the exception of the pre-processing part of course - CSS can use some little help in some places to generate programatically some things but I think those are better served by a pre-processor and not a framework as the framework tends to guide the overall design of the remaining things.
- Wolfr_ 5y agoWe're trying to find the balance between semantic classes and utilities now with @apply. I've always found layout to be easier with utility classes (regardless of Tailwind, this counts for Bootstrap 4 too). I like "atom"-like components better with semantic classes. In BEM/ITSS I'd make a component for -everything-. But in Tailwind we'd only make one for common "atoms" such as buttons, tags, inputs etc. Code example: write ".t-button" and then use @apply to put the classes there. Keeping the design constrained to a set of tokens. .t-button { @apply border inline-flex items-center px-3 leading-5 font-medium rounded focus_outline-none focus_ring-2 focus_ring-offset-2 focus_ring-blue-500; }
- hnedeotes 5y agoSo yeah, I agree with pre-processing utilities - but this is just the same problem as with CSS and I think the apply idea is actually pretty neat... But... I need to know all those classes to know why the final rules are put in place, I need to know that they don't have conflicting properties, or if they have, their priorities. And when you add your own custom apply's in there, then it can also break just the same. And when you customise your tailwind classes it ends the same problem. So when you're trying to figure out why rows in a table with the same number of headers and same number of td's have different sizes because some no-breaking space class was applied, and why your a.btn isn't getting the same styling as your button.btn and etc, I always feel like I've wasted more time than I should (perhaps because I know css and used it extensively) I might have been a bit harsh on saying "dementia" as it's disrespectful for those who've put the work in writing it and releasing. It's better than all previous frameworks - I just personally think that it's problem searching for a solution as you can't really win.
- vehemenz 5y ago> What it does is force you, as other frameworks, to learn all its intricacies, design decisions, use an heavy and complex development environment (that besides that reads files it doesn't have anything to go about reading?) so that you don't need to learn the underlying language. The Tailwind dev environment is literally one Javascript file with a few settings. Not that complex. Tailwind is worthless if you don't know CSS, so I'm not sure that second point works either. > Then it nudges you to write a soup of classes (that you need to learn... Is that bad? Not using Tailwind forces you to have a separate stylesheet that hides tag to property relationships, among other hidden abstractions. The class names barely need to be learned. With an IDE, you get class name completion, and there are only a few properties that have unexpected names. > yes you can write classes that coalesce your styling... but that's kinda the point of CSS and/or any other pre-processor What do you mean "the point of CSS"? Read the spec. It says nothing about the number of properties a class should contain. > and forget about semantically marking your html. Tailwind's reset styles mean you can use whatever "semantic" HTML5 elements you want. If you mean classnames should be higher level abstractions than CSS properties, well, that's a convention that developed during the CSS Zen Garden days. Before that we used HTML attributes for styling. Conventions come and go.