this post was submitted on 13 Mar 2024
6 points (100.0% liked)

Web Development

3875 readers
13 users here now

Welcome to the web development community! This is a place to post, discuss, get help about, etc. anything related to web development

What is web development?

Web development is the process of creating websites or web applications

Rules/Guidelines

Related Communities

Wormhole

Some webdev blogsNot sure what to post in here? Want some web development related things to read?

Heres a couple blogs that have web development related content

CreditsIcon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 2 years ago
MODERATORS
 

This study compares two websites with similar design: the commercial Spotlight template from developers of Tailwind vs the same site with semantic CSS.

all 30 comments
sorted by: hot top controversial new old
[–] [email protected] 5 points 1 year ago (1 children)

I spent the last week learning and then writing technical docs on tailwind for my org. I was skeptical of it at first, now I have an informed dislike of it.

[–] [email protected] 0 points 1 year ago

I often interact with people who don't like something but haven't used it before, so I'm definitely going to steal your term "informed dislike" to distinguish between those cases and ones that are legit gripes.

[–] [email protected] 2 points 1 year ago (2 children)

Tailwind feels like CSS i have to re-learn. It's maybe slightly easier? mostly it just makes my html unreadable to the point i barely know what's going in anymore. I don't do much frontend stuff but i'm gonna go back to plain old CSS for my next project. It all sounds good in theory, but in practice, tailwind has been more work rather than less. I feel like i put a fair amount of time in understanding how everything works too.

It just really feels like one of those things that makes little difference but i wasted way roo much time on trying to give it it's fair chance.

[–] [email protected] 0 points 1 year ago

CSS is great and every framework that tries to mix styling with the page markup needs to die

[–] [email protected] 0 points 1 year ago (1 children)

Absolutely, the goal of Tailwind is not to allow you to skip learning CSS, and if you don't know CSS well, Tailwind is going to be pretty painful.

[–] [email protected] 0 points 1 year ago

I've seen people advocate for Tailwind because "CSS is too hard, I don't want to think about selectors".

CSS isn't too hard, there are easy ways to do things, and hard ways to do things (for backwards compatibility reasons). If you don't learn modern CSS then you're only going to be doing things the hard way.

[–] [email protected] 1 points 1 year ago

The primary CSS is inlined on the HTML page so that all the assets for the first viewport are fetched in the initial request.

It's funny, with HTTP 2, one can go back to just putting the style element back into <head/> where it belongs and gets the same exact behavior.

[–] [email protected] 1 points 1 year ago

A lot of comments seem to think that Tailwind is just a way to save a few keystrokes at the expense of legibility and leanness.

For me, the value comes from not having to jump all over a codebase, not having to name so many things, having clearer scopes and pulling things like colors and spacings from a central config.

I know there's a hundred different ways to solve those issues that wouldn't offend CSS purists but ask 10 different people and you'll get 10 different answers with 10 different caveats.

So I use Tailwind to write fuckugly markup in a faster, easily iterated way that will be instantly familiar to anyone who knows Tailwind.

[–] [email protected] 1 points 1 year ago (3 children)

This person thinks Tailwind is just a grift to make money, prioritizes separations of concerns over all else (I contend they have SoC brain-worms, but I don’t want to get too spicy), and ignores all the actual arguments people use for Tailwind, like how it’s specifically built to suit component frameworks over someone raw-dogging that HTML and CSS. Their argument boils down to “get good” which is the argument that folks use when they’ve never been on a team and have never had to make actual trade-offs.

[–] [email protected] 1 points 1 year ago

Their arguments included the size of the web page, and the time to display the first content, both of which were significantly better in Nue when compared to Tailwind.

By all means argue on what is important (because what is important for your projects may be significantly different from mine), but there were many points that the author was highlighting, not just the separation of concerns. And for my projects, all these concerns are important.

[–] [email protected] 1 points 1 year ago

The tailwind style of zero reusability should be quite useful to AI coding, since one its primary flaws is an inability to reuse components.

[–] [email protected] 0 points 1 year ago (1 children)

Having used it in a major project its a shame that its so inefficient because the user experience really is much much better. It feels like a successor language to CSS because it fixed lots of unobvious and badly named attributes and makes lots of things just easier.

The code is more verbose but also you can completely understand how the page will look just by reading the html.

That said it makes sense the performance is so much worse, where you would have matched on one class for N styles you now match on N classes for N styles.

Theoretically its totally possible to do that matching at compile time and 'compile' the string of classes you wrote into individual ones per element for each combination used in the html though.

[–] [email protected] 0 points 1 year ago (1 children)

you can completely understand how the page will look just by reading the html

You lose being able to read meaning and structure though, and you also lose technical accessibility.

I like to add css hacks to websites. But I can't if they don't have useful, identifying, and stable selectors.

[–] [email protected] 1 points 1 year ago

not really if you use a web framework and actually separate different things into their own components.

but yeah mixing non tailwind css into a tailwind project after the fact would be gross and hard.

[–] [email protected] 0 points 1 year ago (1 children)

Why the editorialized title? Why not use the one from the article?

[–] [email protected] 1 points 1 year ago (1 children)

I don't know what "semantic css" is, to me that's just normal css. I felt the original title could be confusing for people.

[–] [email protected] 0 points 1 year ago (2 children)

But you didn't use the word normal / plain / vanilla. You used proper, which is a loaded word.

[–] [email protected] 1 points 1 year ago

But plain CSS is proper CSS. Tailwind is training wheels for people who don't want to learn CSS.

[–] [email protected] 1 points 1 year ago (3 children)

Oh no, loaded words.

I've changed it to 'normal' :)

[–] [email protected] 2 points 1 year ago

You could just as easily use the article's title and save your opinions for the post body or the comments, but you didn't.

Oh no, implicit bias. Twice!

[–] [email protected] 1 points 1 year ago (1 children)

Please just use the original title. Semantic CSS is an actual thing and it takes 2 seconds to google what it is.

[–] [email protected] 1 points 1 year ago

This is kinda strange. You think I'm going to reword my post a second time??

If you don't like a post, just downvote it or contribute some better posts.

You're probably pissing in the wind tho as this is the most upvoted post in this community in the last 6 months hahaha https://programming.dev/c/webdev?dataType=Post&sort=TopSixMonths

[–] [email protected] 1 points 1 year ago

That guy just pulled the same "misinterpret what you said, pretend it was your fuckup instead of my own overeager interpretation problem" to me here: https://lemm.ee/comment/10695316

Your use of the word "proper" was ... proper as a matter of fact. This guy's just an idiot who enjoys adding a confounding interpretation with his own distorting commentary.

[–] [email protected] 0 points 1 year ago (1 children)

I maintain that tailwind is still an anti pattern. Things like stylex are the way forward for component based systems, I feel.

[–] [email protected] 1 points 1 year ago

React developer?

[–] [email protected] 0 points 1 year ago (1 children)

I loathe Tailwind. It offers absolutely nothing in advantage over plain CSS other than possibly development speed (but not re-development speed). I realise it's meant for frameworks rather than smaller sites but at some point you know someone is going to have to hands on edit that mess.

[–] [email protected] 0 points 1 year ago (1 children)

It helps me make things look presentable without making it look the same as every other website, and without constraining the things I want to do.

[–] [email protected] 0 points 1 year ago

Sure, but plain CSS can do all that too and not leave your source heavier and indecipherable.