DEV Community

On why I prefer not to use elm-css

Dwayne Crooks on November 15, 2024

..., CSS Modules, CSS-in-JS, and Tailwind when I'm not constrained to do so. I've been thinking about this for quite a while but wasn't able to ar...
Collapse
 
whereisthebug profile image
@whereisthebug

I agree!

I can see the value these tools provide for those developers who are new to front-end (but not new to software development) because the mental models behind CSS are quite different from what they're used to.

But ultimately, if you want to seriously work as a front-end developer, you have to learn the basic languages.

Elm-css, Tailwind, etc. are abstractions, but all non-trivial abstractions are leaky.

Collapse
 
dwayne profile image
Dwayne Crooks

I'm not sure if I agree that ALL non-trivial abstractions are leaky but I was definitely saying that elm-css, Tailwind, etc. are leaky abstractions. Thanks for sharing the link. I especially like this part:

As systems become more complex, software developers must rely upon more abstractions. Each abstraction tries to hide complexity, letting a developer write software that "handles" the many variations of modern computing.

However, this law claims that developers of reliable software must learn the abstraction's underlying details anyway.

Collapse
 
thj profile image
T.H. Jacobs

Hi,

Thanks for sharing your experience! Some of the points really hit close to home.

I've shared an article today here on DEV.to - Should I use Tailwind? 5 things to consider. At quintCV, we started out with Tailwind, and it indeed was a breeze to prototype our UIs. We really benefitted from provided design system basics.

Since we started noticing some problems with Tailwind, we decided to step back and re-evaluate whether Tailwind is really worth it.

I talk about those problems in the article, and I'm quite curious what do you think about points I made.

Collapse
 
mikolaj_kubera profile image
Mikolaj Kubera

I had started using elm-ui years ago and never looked back. When a feature is missing, I just slap some Html.Attributes.style on an Element but that's pretty much it.

Collapse
 
michaelhipp profile image
Michael Hipp

This article would be a lot more convincing if you actually gave the correct answer to the 'the image in a container problem". Otherwise this is all just hypothetical and abstract ruminating. Proof is in the pudding.

Collapse
 
dwayne profile image
Dwayne Crooks

The solution was shared in the article via this link.

Collapse
 
michaelhipp profile image
Michael Hipp

A 46 minute video? Really?

Thread Thread
 
dwayne profile image
Dwayne Crooks

It's a 2 minute explanation of the solution and the link points to the start of his explanation in the video.

Collapse
 
rinkattendant6 profile image
Vincent

I've never heard of Elm until now and I agree regarding Tailwind and probably other similar technologies, but I disagree that CSS modules fit with the rest of these. I've never even thought of CSS modules as an abstraction since I still write CSS.

Collapse
 
crenshinibon profile image
Dirk Porsche

I'm completely with you. I'm fine going plain CSS for everything for a while now. It's especially easy and convenient when you are using some sort of "component approach" (like Svelte) that encapsulates all the CSS that belongs to a component right next to the markup. And you can have global styling (like themes) with globally defined CSS variables ... simple and powerful.

Collapse
 
aniruddhaadak profile image
ANIRUDDHA ADAK

just wow β™₯️.

Collapse
 
aniruddhaadak profile image
ANIRUDDHA ADAK

Amazing β™₯️β™₯️β™₯️