top | item 37983243

(no title)

Leimi | 2 years ago

The article is interesting but really feels unfair sometimes, it doesn't help:

- The whole "amount of CSS" part is unfair when the Semantic CSS implementation isn't responsive at all, so of course it will be lighter, it does less.

- The part about the big number of HTML elements is a bit frustrating too; tailwind doesn't require you to use more HTML tags at all. It's totally possible to redo the Semantic CSS example with tailwind by not adding any HTML tags.

Besides that, it's still interesting to try and compare what is the best between big HTML (atomic, tailwind) vs big CSS (semantic).

Tailwind is not perfect, and sure, sometimes, you can get more performant code by writing it the semantic way. Sometimes.

But tailwind sure is a great way to easily write maintainable CSS in a team with different skill sets, producing really performant code by default, on large web apps.

discuss

order

tipiirai|2 years ago

Author here:

- How is it not responsive? I can easily fix.

- The Tailwind example is the official template made by the Tailwind developers themselves.

Leimi|2 years ago

- compare the tailwind example and yours, they don't have the same behavior. The tailwind one has a specific mobile menu for example. And that is just one example.

- sure, but since the tailwind page does more things, it's logical it has more code. Your base for comparison is production used code, sold to people. So of course it's polished, it must handle browser bugs and other things you might not expect in a quickly implemented alternative for a tech article. So I'm not surprised the code is bigger. That doesn't say at all that tailwind == more HTML tags :)

jonwinstanley|2 years ago

Is comparing the markup of an html page with all the style in html attributes, to an html page which imports style from a CSS file (which is not displayed) a fair comparison?

tipiirai|2 years ago

The comparison is exactly that because It's the topic of the article.