Re:Modern CSS Code Snippets: Stop writing CSS like it's 2015
by Sateeshm on Sunday February 15, 2026 @09:16PM
(#47030140)
Tailwind is not what you're describing.
[ Parent
| on HN ]
Re:Modern CSS Code Snippets: Stop writing CSS like it's 2015
by digitalPhonix on Sunday February 15, 2026 @09:19PM
(#47030160)
Isn’t that what utility classes are? Shorthand for inline styles?
Not saying it’s good/bad, but it feels like that’s the use case
Re:Modern CSS Code Snippets: Stop writing CSS like it's 2015
by francislavoie on Monday February 16, 2026 @12:52AM
(#47031329)
It's much more than that because it can make use of CSS pseudo selectors like hover, which is not possible with inline styles.
Re:Modern CSS Code Snippets: Stop writing CSS like it's 2015
by rafark on Monday February 16, 2026 @12:23PM
(#47037649)
Under that definition any css class is a shorthand for inline styles
Re:Modern CSS Code Snippets: Stop writing CSS like it's 2015
by digitalPhonix on Tuesday February 17, 2026 @02:31AM
(#47044688)
There's a big difference between utility classes which are shorthand for inline styles (random example from Tailwind's site where every single class is a one-to-one mapping with a single style override.):
class="ml-3 hidden rounded-lg bg-gray-100 px-2 py-0.5 text-xs/6 font-semibold whitespace-nowrap text-gray-700 lg:block dark:bg-gray-400/15 dark:text-gray-300"
and semantic names which use the CSS cascade: class="main-content subheading"
Calling that a shorthand for inline styles is just being obtuse.