Preferences

I don't know what to think about this style of CSS.

I was taught to use classes semantically and style from there.

A navbar would be a .navbar class for example and that would be styled in the stylesheet.

Istead of a bunch of classes in the html to define the styles for the navbar.

I'm old school though and this may be the better more modern way?


This might be worth a read or listen to with read aloud - https://adamwathan.me/css-utility-classes-and-separation-of-...

He discusses why he changed from this thought process & mentions the old CSS Zen Garden many of us grew up with as the "ideal" way to do CSS.

Of course your mileage may vary depending on the type of work/projects you do.

Holy cow have been rabbit holing on all morning on this.

I've had to fight my zen garden conditioning the whole time but I have to admit this looks good.

Thanks for the link!

This item has no comments currently.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal