Menu

Post image 1
Post image 2
Post image 3
Post image 4
Post image 5
Post image 6
1 / 6
0

Style HTML without writing a single class — introducing classless.css

DEV Community·nJ·about 1 month ago
#tDSyJl2F
#who#how#variants#scoping#button#fullscreen
Reading 0:00
15s threshold

I had a weird thought while building a docs page last month. I was writing this: <button class= "btn btn-primary" > Get started </button> Enter fullscreen mode Exit fullscreen mode And I thought — why does a button need to be told it's a button? It is a button. The browser knows it. The screen reader knows it. Why doesn't the CSS? That thought turned into classless.css — a 47 KB stylesheet that makes plain, semantic HTML look great without adding a single class to your markup. What does "classless" mean? The idea is simple: instead of styling elements by class names, you style native HTML elements directly.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More