5 ms·
Idk if there’s something wrong with me but I just can’t look at tailwind classes like that and think yep that looks good to me. Reminds me of the inline php day
by interstice 1y ago
Idk if there’s something wrong with me but I just can’t look at tailwind classes like that and think yep that looks good to me. Reminds me of the inline php days
- fredrikholm 1y agoI find the design aspect of stringing (primarily) defaults together very pleasing over the alternative of authoring ad hoc CSS/SASS/SCSS for every project. Inlining it however, I'm with you.
- padjo 1y agoThere’s nothing wrong with you, it’s obviously terrible. Tailwind folks will tell you you’re holding it wrong, but every tailwind codebase I’ve seen winds up like this.
- ervine 1y agoI mean the use of tailwind in the article is not good. Shows a lack of CSS understanding. Why are they applying `text-base` instead of just setting that on the root element? Why are they setting text color on the <a> tag and then overriding it on the <span> inside? This person would write bad CSS, let's not put the blame on tailwind. Also so much repetition instead of pulling each breadcrumb link out into a shared component. I understand it's just demo code for an article, but if all code bases end up like this that you've seen, the issue isn't tailwind.
- zdragnar 1y agoMy limited experience is that it's a fair bit harder to do a good job of reviewing PRs with tailwind versus CSS. So many classes tend to blur together in the markup. Might just be me, but I'd rather just see clean(er) markup and styles in a css file.
- padjo 1y agoI don’t think they would write CSS that was as bad. And even if they did, I’d rather look at bad CSS than bad tailwind.
- insin 1y agoIt never looks good, and it never will look good. But users of it will also never (unless they're doing something very weird) unintentionally break styling somewhere else while editing it later or have it broken by changes made elsewhere, have to come up with names for one-off element-specific styles, or have to jump between multiple files for their pseudo, colour scheme-specific and responsive styling. Them's the breaks.
- the_other 1y agoThis wording caught my attention: > have to come up with names for one-off element-specific styles You never have to “name styles”. You have to identify the target element as different from other similar ones. There’s a subtle difference. I wonder if acknowledgement of that difference leads developers to pick different tools to help them manage their CSS. > have to jump between multiple files for their pseudo, colour scheme-specific and responsive styling. I’m gonna infer from this you’ve worked on large CSS codebases and know what you’re doing. I’m not trying to discourage you from whatever your doing: use Tailwind if it helps. I’m just really interested in the problems and mental models that lead people towards Tailwind and similar tools. I’ve never felt drawn to them, despite also feeling the pain of sprawling CSS codebases. (I’ve worked on legacy CSS files so large that versions of IE stopped parsing them; I’ve refactored CSS repeated-but-not-quite across multiple teams’ reimplenetations of the main menu widget, etc).
- interstice 1y agoLove the I've seen things you people wouldn't believe tone of that last bit. _"I wonder if acknowledgement of that difference leads developers to pick different tools to help them manage their CSS"_ yes, this, I think. I've landed on components have their own classes but to share styling across apps I use components or css functions/variables, this has been the best balance for the designs I work with, since they tend to treat most elements as a 'bag of reused styles with some custom padding' most of the time, where reused styles are more custom than tailwind but not generic enough to make higher order components.
- insin 1y ago