You can now use modern CSS gradients and esbuild will convert them to legacy gradients for older browsers. This includes non-sRGB colors, interpolation in other color spaces, and alternate hue interpolation modes.

The picture below compares Firefox's rendering of the original CSS (looks incorrect due to Firefox bugs) with esbuild's transformed CSS (looks correct).

Release notes: https://github.com/evanw/esbuild/releases/tag/v0.19.9
Playground demo: https://esbuild.github.io/try/#dAAwLjE5LjkALS1sb2FkZXI9Y3NzIC0tdGFyZ2V0PWZpcmVmb3gxMDAAZGl2IHsKICBiYWNrZ3JvdW5kOiBsaW5lYXItZ3JhZGllbnQoCiAgY29sb3IoZGlzcGxheS1wMyAxIDAgMCksCiAgY29sb3IoZGlzcGxheS1wMyAwIDAuNiAwKSkKfQ
Some visuals are here: https://esbuild.github.io/gradient-tests/

hachyderm.io ↗

Sign in to like, save or reply.