satori
satori copied to clipboard
Error with linear-gradient
Bug report
I'm using Satori by way of the Eleventy OG plugin.
Description / Observed Behavior
I'm getting an error with the following css:
background-image: linear-gradient(
to bottom right,
transparent 50%,
#e70565 50%
),
linear-gradient(#e70565, #e70565),
linear-gradient(to top left, transparent 50%, #e70565 50%);
background-repeat: no-repeat;
background-size: 10px 68%, calc(100% - 20px) 68%, 10px 68%;
The error is: e70565, #e70565): Missing comma before color stops
Confusingly, the same css with a different colour does not error:
background-image: linear-gradient(
to bottom right,
transparent 50%,
#b393d3 50%
),
linear-gradient(#b393d3, #b393d3),
linear-gradient(to top left, transparent 50%, #b393d3 50%);
background-repeat: no-repeat;
background-size: 10px 68%, calc(100% - 20px) 68%, 10px 68%;
however, it does not render correctly:
Expected Behavior
When rendered on screen (not Satori), these linear gradients add up to look like this:
Reproduction
this errors for me as well:
background: 'linear-gradient(0.05turn, #6c47d7 5%, #1e1f21 70%)',
I get:
Error: .05turn, #6c47d7 5%, #1e1f21 70%): Missing comma before color stops
I was having the same issue with this gradient: linear-gradient(#0B1C31, #1E67B7)
I fixed it by prepending the direction: linear-gradient(to bottom, #0B1C31, #1E67B7)
@CryptoGraffe @itsjavi #624 will fix your problems once merged