|
|
|
|
|
by vim-guru
507 days ago
|
|
CSS has become significantly more user-friendly than in the past, with most browsers now behaving consistently. It's worth learning as there is no build step involved, and it avoids cluttering your markup with excessive code. You could opt to use style attributes directly within your HTML. Historically, we avoided this to maintain a separation of concerns, but it's puzzling why some prefer reintroducing similar methods. Is it just to save a few keystrokes?
Using style attributes even seems more straightforward since it doesn't require translating code in your head. I simply don't see the appeal. |
|
- Pseudo-classes (e.g., :hover, :focus)
- Pseudo-elements (e.g., ::before, ::after)
- Media queries
- Keyframes and animations
And the DX in a larger project isn't great either.
On the other hand, this upcoming standard is a great addition for collocating styles https://developer.mozilla.org/en-US/docs/Web/CSS/@scope