News for hackers. Stuff that matters.
Re:Goodbye CSS Modules, Hello TailwindCSS by LAC-Tech on Thursday November 04, 2021 @04:06PM (#29111924)
I still prefer one big file called "style.css". So much easier than any of the "modern" solutions I've seen.
Re:Goodbye CSS Modules, Hello TailwindCSS by econnors on Thursday November 04, 2021 @04:16PM (#29112036)
this doesn't scale to any reasonably sized project or company
Re:Goodbye CSS Modules, Hello TailwindCSS by ravenstine on Thursday November 04, 2021 @05:01PM (#29112487)
Respectfully, in most cases, this is nonsense.

Not everyone is working at even 1/10th Google scale. Most aren't working at that scale. The vast majority of sites and web apps can get away with a relatively minimal amount of CSS and modern CSS features in a one or a few concatenated files. For the rest of us, tools like Tailwind, SCSS, etc., are best treated as tools to help us be more efficient, and they are not necessities.

If basic CSS doesn't "scale", then it's time to stop and think about whether one is doing the right thing.

Re:Goodbye CSS Modules, Hello TailwindCSS by 1_player on Thursday November 04, 2021 @05:23PM (#29112700)
CSS stops being scalable much earlier than 1/10th Google's scale. Without rigorous practice, CSS' idiosyncrasies start getting in the way after 50 lines of it.
Re:Goodbye CSS Modules, Hello TailwindCSS by LAC-Tech on Thursday November 04, 2021 @04:56PM (#29112437)
It scales further than you think if your html is clean.
Re:Goodbye CSS Modules, Hello TailwindCSS by 01brett on Thursday November 04, 2021 @04:59PM (#29112473)
Author here, I just looked at our frontend build and Create React App bundles our CSS into one big {webpack-hash}.css. It scales well for us because the frontend is a single page app.
Re:Goodbye CSS Modules, Hello TailwindCSS by dwmbt on Thursday November 04, 2021 @04:12PM (#29111981)
i mentioned this in another comment but one takeaway i got from using tailwind is that it changed the way i look at css. i use it as a learning tool as well, which is something i rarely ever get out of solutions that try to do most of the heavy lifting in a project.

consider this comment an open-invitation for other good css references!

Re:Goodbye CSS Modules, Hello TailwindCSS by paulgb on Thursday November 04, 2021 @04:34PM (#29112250)
> consider this comment an open-invitation for other good css references!

I'll take you up on that! Any good resources for learning tailwind that jibe particularly well with your “learning tool” approach?

Re:Goodbye CSS Modules, Hello TailwindCSS by 01brett on Thursday November 04, 2021 @10:13PM (#29114721)
Author here, I would also highly recommend Josh Comeau's CSS for JS Devs course. He covers fundamentals useful in all styling approaches.

https://css-for-js.dev/

Re:Goodbye CSS Modules, Hello TailwindCSS by dwmbt on Thursday November 04, 2021 @11:52PM (#29115247)
i've heard a lot of great things about this course. like, a lot. i'm pretty broke so most of my money goes towards tuition and rent, maybe i'll ask for this for christmas!
Re:Goodbye CSS Modules, Hello TailwindCSS by dwmbt on Thursday November 04, 2021 @06:47PM (#29113398)
i would say the tailwind docs themselves and looking at the examples were a big help. for instance, the way they visualize their flex elements was enlightening. also, learning about how atomic css is a useful paradigm was the biggest motivator for writing more meaningful and expressive css. i'll list some things i've bookmarked:

[0] https://css-tricks.com/lets-define-exactly-atomic-css/ [1] https://adamwathan.me/css-utility-classes-and-separation-of-... [2] https://acss.io/thinking-in-atomic.html

and finally, it's always useful to read critiques. the following article is well written, in my opinion: https://www.browserlondon.com/blog/2019/06/10/functional-css.... through that i learned that tailwind has a useful feature: @apply, which you can use in conjunction with a standard css class approach. i.e container { @apply color-grey-100; box-sizing: border-box; }