Skip to content

Comment on Show HN: CSS Extrasparent

Comments

It's not for DRYing/golfing code.

The main use case of functions is that you can parameterize code. This lets you parameterize stylesheets, like set a base font size and primary color, and then derive your whole theme from it, from spacing to secondary border colors to how buttons look when they're hovered.

You can do that with custom properties already. AFAICT functions don't introduce any new abilities on that front (apart from the aforementioned DRY-ing).

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.