Tailwind is the most counterintuitive yet obvious-in-hindsight CSS tool (or of any class - no pun intended) I've worked with. I know the general sentiment towards Tailwind is "I spent years getting my separation of concerns with HTML/CSS down, but now you're telling me all that is backwards and CSS Zen Garden is blasphemy?" I was in the same boat. Tailwind just felt wrong, and with 15+ years of experience, I've come…
So what's the answer to semantics and user styles? Just, screw it, they aren't important any more? I mean, I get it, it isn't something most people care about, but I still value them.
TailwindCSS v2.0
421–430 of 474 posts
Re: TailwindCSS v2.0
#422Earlier quoted context omitted.
Actually it's more like toolkit to make your own set of utility classes. With one config you can really change it to be whatever you need. I always throw away colors on every project and change it to semantic naming. I add / remove fontsizes, spacing whatever project needs. I've been also confused how can people use it without touching the config but apparently many do. I guess when developers don't have particular d…
> Actually it's more like toolkit to make your own set of utility classes. You mean like CSS? Why recreate raw CSS as classes and use that in your CSS? I'm sorry but all I'm seeing is a huge disconnect.
Re: TailwindCSS v2.0
#423First of all it's not free, to use UI components it would cost many hundreds of dollars.
But maybe cost is not an issue for all, on the other hand productivity might be.
I found myself terribly less productive, having many classes like:
it's very hard to add or remove a rule compared to CSS where each rule is on it's own line.Also some pretty significant issue for me was hot-reloading taking a lot of time, whereas in CSS you can just refresh linked stylesheet, with tailwind you need to reload complete page, and if your page is hosted on a Django/Symfony/RoR application in development mode, you better have to be patient at each CSS modification !
Re: TailwindCSS v2.0
#424While it may seems like a great idea, I just finished a project for a client on Tailwind. First of all it's not free, to use UI components it would cost many hundreds of dollars. But maybe cost is not an issue for all, on the other hand productivity might be. I found myself terribly less productive, having many classes like: it's very hard to add or remove a rule compared to CSS where each rule is on it's own line. A…
Re: TailwindCSS v2.0
#425Earlier quoted context omitted.
> I'm trying not to make this too much of a dogmatic discussion, but is the cultural norm among developers going to be to just throw their hands in the air and say "styling is hard, let's go shopping for divs"? The experiment failed though, we've been trying for over a decade. You can't let one group write the HTML and one group write the CSS (with the pipedream being the designers writing the CSS). The only way to m…
Honestly, I don't buy it. It might be the case if you are trying to target IE9, but "we've been trying it over a decade" is no longer an excuse in 2020 when there are only 2-3 relevant browser engines and all of them are reasonably up to spec. Also, it's not a matter of strictly separating the groups of people doing one task or another. It's a matter of being able to extend in one dimension while keeping the other un…
> Also, it's not a matter of strictly separating the groups of people doing one task or another. It's a matter of being able to extend in one dimension while keeping the other untouched.
Have you worked on a website with a complex web design? If you know how to do this where you write the HTML with only semantic markup tags then don't touch it again while you style it with CSS, you're breaking new ground because nobody has figured out how to do this.
That's why Tailwind, Tachyons, Bootstrap etc. exist and continue to evolve - nobody has figured out the best way to do things yet. The MVC style you can do in other languages just isn't practical with standard HTML and CSS and it's not through lack of people trying. CSS has rapidly been improving the last few years but we're still a long way away from being able to avoid e.g. adding a wrapper div or shuffling HTML around to solve CSS issues.
> all they are going to do is this mushing together of their structure and their presentation layers
I think the issue here is you think HTML is for structure only and CSS is for presentation only, when the practical reality is HTML is mostly part of the presentation layer as well because CSS alone isn't powerful + practical enough.
Large websites already store their page titles, page content etc. in a structured CMS database. What tangible benefit are you getting by pushing to separate structure and presentation more than this?
For non-web apps, how is structure and presentation split up more than this and how does it differ from web apps?
Re: TailwindCSS v2.0
#426Earlier quoted context omitted.
> It's about separating concerns to allow extensibility of one aspect of the component without having to worry about the other parts of the system. Right, and I don't see the HTML and the CSS as separate concerns when the HTML describes a GUI, not a document. There being two languages in play is a historical detail that as developers we have to tackle in the best way. I don't believe that it's some sort of holy spiri…
> Right, and I don't see the HTML and the CSS as separate concerns when the HTML describes a GUI, not a document. You know that you can create themes in GTK (a Desktop GUI) using CSS nowadays, right? Whether a document or a GUI, behavior (how it works) and presentation (how it looks) are still separate concerns. > (Multiple styles)'s not a thing I've ever needed to worry about. Yeah, others have though - both as cons…
Does GTK offer CSS layouts? Do I describe the elements of the UI using HTML? As far as I know they just use a subset of CSS - aren't the selectors predefined by the framework? I don't recall, exactly. But GTK provides an entirely different set of primitives, I don't think it's the same problem at all if you're just providing fonts and colours. Again, I'm talking about something rather specific, creating complex, desktop-like user interfaces using HTML and SPA frameworks.
> behavior (how it works) and presentation (how it looks) are still separate concerns.
Yeah, but I wouldn't say that that distinction maps to the distinction between CSS and HTML at all, not in my context. HTML, especially document structure, is also presentational. That's really what I mean when I say it's not a "document".
And any way, no matter which approach (and platform, I'd wager) you use, if you want to completely restyle a complex GUI application like what I'm writing in the way you could restyle HTML documents like the Zen garden, you're looking at some serious engineering effort in keeping the so-called behavioural HTML and Javascript in check and documented. It won't just be about how you handle the CSS, it'll be about how you handle everything.
> Yeah, others have though - both as consumers and as integrators. If you are okay with the idea of re-inventing wheels every time you want to have a different color, plenty of people are not.
I actually feel like I have better control of my colours with Tailwind than I ever did. Currently I'm using a limited selection specified in the Tailwind theme. They have names like $adjective-$colour, so it'd be weird to change them, but if that's important to you that things are themable, as I stated, you can put in the effort to set it up with semantic names and make them customizable at build time or at run time. I still think you'd have a better experience than making separate classes for every tag and reimplementing that for each theme.
> It's not a matter of being afraid to touch HTML. It's a matter of not being able to! ...
And all of these things you list are not what I do. The examples that you list have a different set of trade-offs. I'm not embedding other people's code in my GUI, and I don't expect them to take a random chunk of my application and put them into theirs. OpenDoc was a fun idea, but it didn't take off.
> What made the web as interesting as an application platform was the idea that the user agent could be extended.
I don't really know about that in the general case, I think there are more reasons than that, but in the specific case I'm certain it's wrong. The reason my company is doing what it's doing on the web is 100% about distribution. Arguably, the web stack isn't even that good for making the kind of UIs I do - but if we did what we're doing in Java, we wouldn't get any users (or investors).
I totally agree with you about openness, but openness in my space means providing good APIs and integrations with other services, not allowing user stylesheets. A user stylesheet for my app would mean a twenty page list of weirdly interdependent CSS selectors, and the end result for someone who implemented it would be something like a colour theme that only works for app. Explain to me who would want that.
Re: TailwindCSS v2.0
#427Earlier quoted context omitted.
I no longer think of myself as a "document writer", and there honestly would not be room in my team for someone who only wanted to touch the HTML and not the CSS or vice versa. I was there for the Zen Garden, and it was great at the time and in its context (Flash and image maps!), but now I'm using the web stack for a 3D editing application, and my last job was complex GUI for managing large number of IoT devices. Th…
> Good software engineering is super important, more-so than ever I'd say, This smells of complexity to-justify-my-paycheck thinking about software. Css and html go well as seperate documents which makes things like theming and maintenance work but not frustrating. Why do we need the tooling overhead if the gains are marginal? SCSS gave css the powers it needed to be flexible but Tailwind sounds like classic cool-kid…
React etc. are extremely nice if you're making complex applications for the web. Of course it can be overused, but I'd say that some kind of SPA framework (and state management framework) is a requirement for the work that I do.
Re: TailwindCSS v2.0
#428Earlier quoted context omitted.
For the minimal CSS framework, I've been a fan of Tachyons on past projects https://tachyons.io/
I did like how you can use Tachyons as a raw stylesheet without complicating your build process. However, tachyons is even worse than Tailwind in that it offers far too few classes for margins, padding, widths, etc. so you end up having to build everything custom anyways. And you can't just "try" one of these frameworks once or twice, you have to memorize their particular syntax or you lose all of the benefits of usi…
Re: TailwindCSS v2.0
#429Earlier quoted context omitted.
Honestly, I don't buy it. It might be the case if you are trying to target IE9, but "we've been trying it over a decade" is no longer an excuse in 2020 when there are only 2-3 relevant browser engines and all of them are reasonably up to spec. Also, it's not a matter of strictly separating the groups of people doing one task or another. It's a matter of being able to extend in one dimension while keeping the other un…
> Honestly, I don't buy it. It might be the case if you are trying to target IE9, but "we've been trying it over a decade" is no longer an excuse in 2020 when there are only 2-3 relevant browser engines and all of them are reasonably up to spec. > Also, it's not a matter of strictly separating the groups of people doing one task or another. It's a matter of being able to extend in one dimension while keeping the othe…
No, I said that I style it with SCSS.
I can give you all the utility classes you want - in the form of mixins. Then all your site styling and components can be defined in terms of these mixins.
I said that I am not against Tailwind in general. What I don't understand about it is the idea of having already all the mixins and utility classes and then letting people stick those in the HTML.
> What tangible benefit are you getting by pushing to separate structure and presentation more than this?
Go take a look at the template sites like ThemeForest and CreativeTim. Some of the templates look actually quite nice and could be an excellent starting point for a project. What they all have in common is that you have 5 JS technologies and maybe 3-4 different styles and they sell each permutation of these as a separate "bundle".
Then you actually download the thing and start working with it. You find out that some older versions will use Bootstrap 3, some will use Bootstrap 4. Some of them have their widget implemented with an outdated jquery plugin, but the rest is with React/Vue. And then you realize why no one makes big projects out of these things, because it requires an all-or-nothing approach when it is not necessary.
In my fantasy land, we get javascript UI component libraries that are standardized and a separate set of SCSS implementation of "design languages". So when I am writing an app and I want to have, say, an autocomplete that looks like Material Design, I can import only one widget and one "theme", instead of hoping that some React/Vue/Angular/Nuxt/Svelte/JS_FRAMEWORK_DU_JOUR has already implemented components following the style of Material/Bootstrap/God-Knows-what-Design-Language-is-fashionable-today.
Re: TailwindCSS v2.0
#430While it may seems like a great idea, I just finished a project for a client on Tailwind. First of all it's not free, to use UI components it would cost many hundreds of dollars. But maybe cost is not an issue for all, on the other hand productivity might be. I found myself terribly less productive, having many classes like: it's very hard to add or remove a rule compared to CSS where each rule is on it's own line. A…
Can you elaborate on what you mean by "it's not free"? Based on Github, Tailwindcss is open-source and MIT licensed.