open-props icon indicating copy to clipboard operation
open-props copied to clipboard

gradients should auto upgrade to `oklab` and HDR

Open argyleink opened this issue 1 year ago • 3 comments

argyleink avatar Aug 24 '23 21:08 argyleink

I think for the colors it's okay, but for the gradients, we have to wait for Firefox support. https://developer.mozilla.org/en-US/docs/Web/CSS/hue-interpolation-method

mobalti avatar Aug 30 '23 21:08 mobalti

In the meantime, we also need more gradients.

mobalti avatar Aug 30 '23 22:08 mobalti

this could be something like:

:root {
  --space: ;
  --gradient-1: linear-gradient(to right var(--space), red, blue);
  --gradient-2: …;
  --gradient-3: …;
}

@supports (background: linear-gradient(to right in oklab, #000, #fff)) {
  :root {
    --space: in oklab;
  }
}

argyleink avatar Aug 31 '23 21:08 argyleink