satori
satori copied to clipboard
Transparent linear gradient rendered incorrectly
Bug report
Description / Observed Behavior
When using a linear gradient with transparent, it's not actually transparent, it's just black.
Expected Behavior
This css - backgroundImage: 'linear-gradient(transparent, transparent, white)',
should render from transparent directly to white. Instead it renders from dark gray to white.
This is the expected behavior: https://codepen.io/bdlowery/pen/dyrrjgW
Reproduction
Ran into this as well — a workaround like 'linear-gradient(to bottom, #ffffff00, #ffffff00, white)'
got me closer to what I wanted.
Ran into this as well — a workaround like
'linear-gradient(to bottom, #ffffff00, #ffffff00, white)'
got me closer to what I wanted.
It makes it better but it lightens it up more than ideal.
I thought this wasn't spec, but it is actually spec nowadays: transparent
depends on the neighbouring colors in the gradient:
https://www.w3.org/TR/css-images-3/#example-77596609
You can even see in the tabs what the expected behavior should be.
HTML tab shows the expected behavior.