tailwindcss/packages
Adam Wathan 13f05e2711
Support specifying gradient interpolation method via modifier (#14984)
This PR adds support for specifying a color interpolation method for all
gradient utilities using a modifier:

```html
<div class="bg-linear-to-r/oklab">
```

Supported bare values are any valid color space keyword, as well as the
special keywords `shorter`, `longer`, `increasing`, and `decreasing`,
which are shortcuts for `in oklch {keyword} hue`.

Arbitrary values are also supported and are used as-is, so the `in`
keyword is not automatically included for you:

```html
<div class="bg-linear-to-r/[in_oklab]">
```

Modifiers are not supported when using arbitrary values for the actual
gradient, as it's expected that your arbitrary gradient value contain
all of the details you want in your gradient:


```html
<!-- Won't work -->
<div class="bg-linear-[to_right]/oklab">

<!-- Do this -->
<div class="bg-linear-[to_right_in_oklab]">
```

Resolves https://github.com/tailwindlabs/tailwindcss/issues/14955, but
it may still be wise to make `oklab` the default since I do sort of
agree with the poster there that most people probably expect a gradient
between two colors to sort of just "fade" between them rather than
interpolate between them around the color wheel.

---------

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2024-11-13 10:18:59 -05:00
..
@tailwindcss-cli Upgrade @parcel/watcher to 2.5.0 (#14978) 2024-11-13 11:38:43 +01:00
@tailwindcss-node Prepare v4.0.0-alpha.33 release (#14967) 2024-11-11 20:28:41 -05:00
@tailwindcss-postcss Prepare v4.0.0-alpha.33 release (#14967) 2024-11-11 20:28:41 -05:00
@tailwindcss-standalone Update @types/bun 1.1.11 → 1.1.13 (patch) (#14936) 2024-11-13 11:56:58 +01:00
@tailwindcss-upgrade Prepare v4.0.0-alpha.33 release (#14967) 2024-11-11 20:28:41 -05:00
@tailwindcss-vite Prepare v4.0.0-alpha.33 release (#14967) 2024-11-11 20:28:41 -05:00
internal-example-plugin Prefix internal modules with internal-* (#14074) 2024-07-29 10:58:07 -04:00
tailwindcss Support specifying gradient interpolation method via modifier (#14984) 2024-11-13 10:18:59 -05:00
tsconfig.base.json introduce v4 codebase 2024-03-05 14:29:15 +01:00