Hacker News new | ask | show | jobs
by JCB_K 5051 days ago
No it doesn't really, it keeps your HTML clean. Sure, there's better ways of getting a MacBook into your webpage, but this definitely shows the power of the :before and :after selectors.
2 comments

It may keep your HTML clean, but it makes your CSS messy!
That's why I said there's better ways of getting a MacBook into your webpage. But my point still stands, :before and :after are very powerful.
I'd much rather have clean, reusable HTML. CSS you can use preprocessors to abstract away the messiness.
Aren't you using templates and macros for HTML already?
Changing how the HTML macros expand likely ends up requiring CSS changes (in practice, though not necessarily in a theoretically-ideal code base). One change in two places, vs one change in one place.
No, I typically write entirely client side applications.
Any reading recommendations for someone who isn't?
> No it doesn't really, it keeps your HTML clean.

You can also keep your kitchen clean by stuffing all the dirty stuff into the cupboards.