top | item 42348436

(no title)

probabletrain | 1 year ago

I think "tons of code and maintenance" is an exaggeration for this effect, once it's done you'll rarely have to come back to it.

Many people value creating and using products with these kinds of details, I disagree with "don't use this in projects you intend to maintain" as across-the-board advice.

discuss

order

sureIy|1 year ago

> 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.

henriquez|1 year ago

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.

anamexis|1 year ago

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

Aeolun|1 year ago

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

preommr|1 year ago

> I disagree with "don't use this in projects you intend to maintain" as across-the-board advice

Backdrop-filter is... fine. Using masks, animations, and backdrop filter, and gradients, especially for fine details like edges, are just asking for trouble.

Browsers are incredibly complicated, and rendering engines have lots of edge cases, broken features, slight incompatibility issues some of which vary by hardware/os/enabled-flags.

IME, this would definitely not be worth it.

gjsman-1000|1 year ago

I’m at the point in my career where if it’s an internal project, zero shame for Bootstrap and JQuery. If that’s what floats your boat, do it. It’s simple, well understood, functional.