Rethink Atomic CSS CSS Trucks

I’m not a big fan of Atomic CSS myself. I don’t like all classes. I like to express my style in CSS because I like CSS. But I appreciate the fact that a lot of people like it, and it has some obvious advantages, such as the fact that the styled sheets produced are usually smaller than the handmade CSS that other methods use. In addition, the available classes are such as to ensure more consistent use in the design system.

I also appreciate the innovation that is taking place in this space. Looks like it’s gone from here:

There are over a billion classes that you can use, but hey, at least CSS is still small enough and won’t change!


Yes, they are, but we are going to remove the ones you are not using.

and now:

We’re going to create a style sheet on the fly based on what you use.

Anthony Fu breaks this date well into “Remaining Atomic CSS” where he takes things a step further with UnoCSS and throws his hat in the ring. I can’t say that I fully understand all of them, but it seems that it can do anything that its predecessors can do, but most of all, through a set of principles. It’s also fast (based on White), and I’ve always been a fan of Sharp tools, especially where the goal is a solidly written feedback loop.

It seems complicated to me and seems to have limited integration. I’m not a fan of the bit that turns styling into arbitrary HTML attributes. If they were like JSX props, that’s fine. But I think HTML attributes that go to DOM are dangerous and should be data-* Scope

At the same time, I always like it when people think about problems and share their thinking process for solving them, as Anthony did here. Also, there is a playground and it’s fun.

Direct link 1

Add a Comment

Your email address will not be published. Required fields are marked *