argyleink / open-props

CSS custom properties to help accelerate adaptive and consistent design.
https://open-props.style
MIT License
4.66k stars 190 forks source link

gradients should auto upgrade to `oklab` and HDR #397

Open argyleink opened 1 year ago

mobalti commented 1 year ago

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 commented 1 year ago

In the meantime, we also need more gradients.

argyleink commented 1 year ago

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;
  }
}