Better Box Shadows (CSS)
uglyduck.ca
uglyduck.ca
box-shadow: 0 18px 16px -15px rgba(0,0,0,0.3), 0 10px 10px -20px rgba(0,0,0,0.8);I am curious: Do you have some numbers? What is this statement based on? Intuitively I'd agree, but on a technical level I am not so sure.
If you apply two gaussian blurs, you're multiplying two gaussian functions in the frequency domain. The product of two gaussian functions is another gaussian function, so the same effect can be accomplished more efficiently with a single gaussian blur. You just need to tweak the shadow opacity and blur radius.
And even that effect should be possible to approximate with a regular box-shadow, by layering a white shadow on top of a transparent black.
Actually, I was thinking about this as I went to sleep last night, and I think I was wrong about the opacity being a factor. The convolution kernels will be normalized, which means that their composition will also be normalized. That means that the only parameter to adjust is the radius.
As a side note, it’s kind of interesting that the first property “still a Gaussian blur” is easiest to see in the frequency domain as a product, while the second property “still integrates to 1” is easier to see when thinking in the spatial domain as a convolution.
And one last tidbit my brain wandered to: you might notice that the product of two Gaussian functions results in a new Gaussian narrower than the originals. Yet the blur radius in the spatial domain is obviously wider. This is because the Fourier transform of a wider Gaussian is a narrower Gaussian and vice versa, and that is a special case of the uncertainty principle.
God I miss image processing.
What I'd like to see is browser engines converge on identical box shadow rendering. Currently shadows tend to be more pronounced in Firefox relative to WebKit.
yeah, last i looked at this, negative spread was essentially useless for anything but the most subtle tweak because it looked so different in firefox and chrome.
On desktop, I had to set my browser zoom to 75% for it to be legible at all, at which point a new column on the left appeared. I thought I'd accidentally clicked on a link or something.
Then I tried scrolling with my trackpad and it wouldn't, finally figuring out because my cursor was over the left half of the screen, and only the box inside of the right half of the screen scrolls.
The overall visual look is cool, but the usability is terrible. Ironic that the first words on the home page are:
Make a good first impression
Your website might be the first and only interaction with potential customers.
Don’t screw it up.
...overly complex UIs can make for a horrible experience.
You need to treat your users with respect and value their time.As it is, keyboard users will have to press Tab seven times before the keyboard navigation keys (arrows, Space, Shift+Space, Page Up, Page Down, Home, End) work.
For this reason, I strongly recommend that websites (as distinct from web apps) avoid placing article content within a new scrolling area. Use the document scroll area.
> For this reason, I strongly recommend that websites (as distinct from web apps) avoid placing article content within a new scrolling area. Use the document scroll area.
I agree with this.
Again, I'm sure there are lots of sites still out there like this, but I just don't see them very often. My eyesight isn't top-notch anymore, but the only site that I routinely visit that I have to have set on a higher-than-default zoom to be able to read is (ahem) Hacker News, because it uses tiny black fonts on light gray backgrounds. (Except for the places it uses, uh, tiny gray fonts on light gray backgrounds.)
Your whole comment is spot on, but this is particular funny because I pointed it out to someone the other day and instead of scrolling up to see for himself he just...chose not to believe it. [1]
More amusing was the advertised blogpost last time I logged in that said using a dark theme for your email promotions was modern and would attract more interaction.
I don't use Sendgrid, so I don't know what their admin panel is like. I recall that some of the worst remaining offenders in the "gray text on gray background" category are SaaS dashboards...
Also the content; I have read almost every article since I clicked on this link.
Also, please nobody actually use this on a site I might visit - using all this processing power to make a drop shadow marginally better/worse is one of the many reasons we can't have nice things.
Hard to force others to not use it, but you can override those declarations in your browser's user style sheet so it will not render them (that's what user styles are for).
`, :before, *:after { box-shadow: none !important; }` in real user style sheet, i.e. in Firefox profile in chrome sub-folder and `toolkit.legacyUserProfileCustomizations.stylesheets` turned on should do the trick. Or -- with boosted selector specificity -- you can use some userstyle manager extension (like Stylus) to do the same.
Skeuomorphism brings to mind iOS design from 10 years ago. It wasn't good looking at all. (Granted, it was overblown and in your face.)
I'd like a retro look with subtle 3D cues, like how Windows and MacOS used to look ~20 years ago. Transparency used in some places (like Windows 7) would be welcome.
Just needs an area light source or more than one spot source.