No, Utility Classes Aren’t the Same As Inline Styles | frontstuff

This is supposed to be a defence of utility classes …but it’s actually a great explanation of why classes in general are a great mechanism for styling.

I don’t think anyone has ever seriously suggested using inline styles—the actual disagreement is about how ludicrously rigid and wasteful the class names dictated by something like Tailwind are. When people criticise those classes they aren’t advocating for inline styles—they’re advocating for better class names and making more use of the power of the class selector in CSS, not less.

Anyway, if you removed every instance of the word “utility” from this article, it would still work.

No, Utility Classes Aren’t the Same As Inline Styles | frontstuff

Tagged with

Responses

Baldur Bjarnason

“Adactio: Links—No, Utility Classes Aren’t the Same As Inline Styles - frontstuff” “Anyway, if you removed every instance of the word “utility” from this article, it would still work.” adactio.com/links/18141

Juan

Agree with this. When I see a long line of utility classes in the HTML, my eyes and brain hurts almost as much as when I see a long line of inline styles in that same HTML. adactio.com/links/18141

# Posted by Juan on Thursday, May 27th, 2021 at 7:54am

Related links

Better typography with text-wrap pretty | WebKit

Everything you ever wanted to know about text-wrap: pretty in CSS.

Tagged with

CSS Form Control Styling Level 1

This looks like a really interesting proposal for allowing developers more control over styling inputs. Based on the work being done the customisable select element, it starts with a declaration of appearance: base.

Tagged with

Justified Text: Better Than Expected? – Cloud Four

Some interesting experiments in web typography here.

Tagged with

una.im | Updates to the customizable select API

It’s great to see the evolution of HTML happening in response to real use-cases—the turbo-charging of the select element just gets better and better!

Tagged with

New CSS that can actually be used in 2024 | Thomasorus

Logical properties, container queries, :has, :is, :where, min(), max(), clamp(), nesting, cascade layers, subgrid, and more.

Tagged with

Related posts

Making the new Salter Cane website

A redesign with modern CSS.

Displaying HTML web components

You might want to use `display: contents` …maybe.

Making the Patterns Day website

The joy of getting hands-on with HTML and CSS.

Assumption

Separate your concerns.

Control

Trying to understand a different mindset to mine.