Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> is an exaggeration for this effect

I disagree. Check the changes required to the spacing/sizing. Soon you will need to adjust those values and that.is.maintenance. Multiply this by each detail and soon you have more work than you signed up for. This is usually when someone comes along and wants a rewrite because the codebase is fragile.



If you're using a CSS preprocessor like SCSS or LESS you can just define the height for the toolbar as a variable and then use the mask area for the blur as a multiplier (eg. 1.88) of that variable. In general for making things easy.to.maintain it's better to not build project-wide stylesheets with raw CSS.


You don't even need a preprocessor for that with var() and calc(). It's perfectly possible to write clear and easily maintainable raw CSS nowadays.


It's not universally safe to use CSS nesting yet. Without nesting support, writing raw CSS is like raw-dogging a sex-trafficked Vietnamese prostitute from Malaysia. Sure, it will probably work, but if your goal is zero maintenance then you're ignoring the post-exposure prophylaxsis and antibiotic regimens necessary for typical usage patterns.


Why would you need to adjust any spacing/sizing values for for the blur? There’s not much of anything to adjust.


Maybe just use CSS vars from the start? Doesn’t look like you really need to change anything but the containing element though.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: