Skip to content

Commit 2b409f4

Browse files
authored
add postcss-gradients-interpolation-method to postcss-preset-env (#910)
* add `postcss-gradients-interpolation-method` to `postcss-preset-env` * one more fix * cssdb update
1 parent c67d198 commit 2b409f4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1429
-517
lines changed

package-lock.json

Lines changed: 61 additions & 95 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/css-color-parser/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changes to CSS Color Parser
22

3-
### 1.1.0 (minor)
3+
### Unreleased (minor)
44

55
- Add a flag to `serializeP3` and `serializeRGB` to skip gamut mapping.
66

plugin-packs/postcss-preset-env/.tape.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,14 @@ postcssTape(plugin)({
167167
browsers: '> 0%'
168168
},
169169
},
170+
'basic:preserve:false': {
171+
message: 'supports { preserve: false, stage: 0, browsers: "> 0%" } usage',
172+
options: {
173+
preserve: false,
174+
stage: 0,
175+
browsers: '> 0%'
176+
},
177+
},
170178
'basic:hebrew': {
171179
message: 'supports { logical: { inlineDirection: "right-to-left" }, stage: 0, browsers: "> 0%" } usage',
172180
options: {

plugin-packs/postcss-preset-env/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changes to PostCSS Preset Env
22

3+
### Unreleased (minor)
4+
5+
- Added `@csstools/postcss-gradients-interpolation-method` [Check the plugin README](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-gradients-interpolation-method#readme) for usage details.
6+
- Updated `cssdb` to `7.5.2` (patch)
7+
38
### 8.1.0 (March 25, 2023)
49

510
- Added `@csstools/postcss-color-mix-function` [Check the plugin README](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-mix-function#readme) for usage details.

plugin-packs/postcss-preset-env/FEATURES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ The `ID` listed is the key for PostCSS Preset Env configuration in your project.
1313
| `clamp` | `clamp` Function | [example](https://preset-env.cssdb.org/features/#clamp) | [docs](https://github.com/polemius/postcss-clamp#readme) |
1414
| `color-function` | `color()` Function | [example](https://preset-env.cssdb.org/features/#color-function) | [docs](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-function#readme) |
1515
| `color-functional-notation` | Color Functional Notation | [example](https://preset-env.cssdb.org/features/#color-functional-notation) | [docs](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-functional-notation#readme) |
16+
| `color-mix` | `color-mix()` Function | [example](https://preset-env.cssdb.org/features/#color-mix) | [docs](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-mix-function#readme) |
1617
| `custom-media-queries` | Custom Media Queries | [example](https://preset-env.cssdb.org/features/#custom-media-queries) | [docs](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-custom-media#readme) |
1718
| `custom-properties` | Custom Properties | [example](https://preset-env.cssdb.org/features/#custom-properties) | [docs](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-custom-properties#readme) |
1819
| `custom-selectors` | Custom Selectors | [example](https://preset-env.cssdb.org/features/#custom-selectors) | [docs](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-custom-selectors#readme) |
@@ -25,6 +26,7 @@ The `ID` listed is the key for PostCSS Preset Env configuration in your project.
2526
| `font-format-keywords` | Font `format()` Keywords | [example](https://preset-env.cssdb.org/features/#font-format-keywords) | [docs](https://github.com/valtlai/postcss-font-format-keywords#readme) |
2627
| `font-variant-property` | `font-variant` Property | [example](https://preset-env.cssdb.org/features/#font-variant-property) | [docs](https://github.com/postcss/postcss-font-variant#readme) |
2728
| `gap-properties` | Gap Properties | [example](https://preset-env.cssdb.org/features/#gap-properties) | [docs](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-gap-properties#readme) |
29+
| `gradients-interpolation-method` | Gradients Interpolation Method | [example](https://preset-env.cssdb.org/features/#gradients-interpolation-method) | [docs](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-gradients-interpolation-method#readme) |
2830
| `has-pseudo-class` | `:has()` Relational Pseudo-Class | [example](https://preset-env.cssdb.org/features/#has-pseudo-class) | [docs](https://github.com/csstools/postcss-plugins/tree/main/plugins/css-has-pseudo#readme) |
2931
| `hexadecimal-alpha-notation` | Hexadecimal Alpha Notation | [example](https://preset-env.cssdb.org/features/#hexadecimal-alpha-notation) | [docs](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-hex-alpha#readme) |
3032
| `hwb-function` | `hwb()` Function | [example](https://preset-env.cssdb.org/features/#hwb-function) | [docs](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-hwb-function#readme) |

plugin-packs/postcss-preset-env/dist/index.cjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

plugin-packs/postcss-preset-env/dist/index.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

plugin-packs/postcss-preset-env/dist/plugins/plugins-options.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import type { pluginOptions as postcssFocusWithin } from 'postcss-focus-within';
2020
import type { pluginOptions as postcssFontFormatKeywords } from '@csstools/postcss-font-format-keywords';
2121
import type { pluginOptions as postcssFontVariant } from '../types/postcss-font-variant/plugin-options';
2222
import type { pluginOptions as postcssGapProperties } from 'postcss-gap-properties';
23+
import type { pluginOptions as postcssGradientsInterpolationMethod } from '@csstools/postcss-gradients-interpolation-method';
2324
import type { pluginOptions as postcssHasPseudo } from 'css-has-pseudo';
2425
import type { pluginOptions as postcssColorHexAlpha } from 'postcss-color-hex-alpha';
2526
import type { pluginOptions as postcssHWBFunction } from '@csstools/postcss-hwb-function';
@@ -93,6 +94,8 @@ export type pluginsOptions = {
9394
'font-variant-property'?: postcssFontVariant | boolean;
9495
/** plugin options for "postcss-gap-properties" */
9596
'gap-properties'?: postcssGapProperties | boolean;
97+
/** plugin options for "@csstools/postcss-gradients-interpolation-method" */
98+
'gradients-interpolation-method'?: postcssGradientsInterpolationMethod | boolean;
9699
/** plugin options for "css-has-pseudo" */
97100
'has-pseudo-class'?: postcssHasPseudo | boolean;
98101
/** plugin options for "postcss-color-hex-alpha" */

plugin-packs/postcss-preset-env/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"@csstools/postcss-color-function": "^2.1.0",
4848
"@csstools/postcss-color-mix-function": "^1.0.0",
4949
"@csstools/postcss-font-format-keywords": "^2.0.2",
50+
"@csstools/postcss-gradients-interpolation-method": "^3.0.0",
5051
"@csstools/postcss-hwb-function": "^2.2.0",
5152
"@csstools/postcss-ic-unit": "^2.0.2",
5253
"@csstools/postcss-is-pseudo-class": "^3.1.1",
@@ -68,7 +69,7 @@
6869
"css-blank-pseudo": "^5.0.2",
6970
"css-has-pseudo": "^5.0.2",
7071
"css-prefers-color-scheme": "^8.0.2",
71-
"cssdb": "^7.5.1",
72+
"cssdb": "^7.5.2",
7273
"postcss-attribute-case-insensitive": "^6.0.2",
7374
"postcss-clamp": "^4.1.0",
7475
"postcss-color-functional-notation": "^5.0.2",

plugin-packs/postcss-preset-env/scripts/plugins-data.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@
9999
"id": "gap-properties",
100100
"importName": "postcssGapProperties"
101101
},
102+
{
103+
"packageName": "@csstools/postcss-gradients-interpolation-method",
104+
"id": "gradients-interpolation-method",
105+
"importName": "postcssGradientsInterpolationMethod"
106+
},
102107
{
103108
"packageName": "@csstools/postcss-hwb-function",
104109
"id": "hwb-function",

plugin-packs/postcss-preset-env/src/lib/ids-by-execution-order.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export default [
1717
'logical-properties-and-values', // run logical-properties-and-values before dir-pseudo-class
1818
'dir-pseudo-class',
1919
'all-property', // run all-property before other property polyfills
20+
'gradients-interpolation-method', // run before all color functions
2021
'color-mix', // run before any other color functions
2122
'color-functional-notation',
2223
'double-position-gradients',

plugin-packs/postcss-preset-env/src/plugins/plugins-by-id.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import postcssFocusWithin from 'postcss-focus-within';
2020
import postcssFontFormatKeywords from '@csstools/postcss-font-format-keywords';
2121
import postcssFontVariant from 'postcss-font-variant';
2222
import postcssGapProperties from 'postcss-gap-properties';
23+
import postcssGradientsInterpolationMethod from '@csstools/postcss-gradients-interpolation-method';
2324
import postcssHasPseudo from 'css-has-pseudo';
2425
import postcssColorHexAlpha from 'postcss-color-hex-alpha';
2526
import postcssHWBFunction from '@csstools/postcss-hwb-function';
@@ -74,6 +75,7 @@ export const pluginsById = new Map(
7475
['font-format-keywords', postcssFontFormatKeywords],
7576
['font-variant-property', postcssFontVariant],
7677
['gap-properties', postcssGapProperties],
78+
['gradients-interpolation-method', postcssGradientsInterpolationMethod],
7779
['has-pseudo-class', postcssHasPseudo],
7880
['hexadecimal-alpha-notation', postcssColorHexAlpha],
7981
['hwb-function', postcssHWBFunction],

plugin-packs/postcss-preset-env/src/plugins/plugins-data.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ export default [
9999
'id': 'gap-properties',
100100
'importName': 'postcssGapProperties',
101101
},
102+
{
103+
'packageName': '@csstools/postcss-gradients-interpolation-method',
104+
'id': 'gradients-interpolation-method',
105+
'importName': 'postcssGradientsInterpolationMethod',
106+
},
102107
{
103108
'packageName': '@csstools/postcss-hwb-function',
104109
'id': 'hwb-function',

plugin-packs/postcss-preset-env/src/plugins/plugins-options.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import type { pluginOptions as postcssFocusWithin } from 'postcss-focus-within';
2020
import type { pluginOptions as postcssFontFormatKeywords } from '@csstools/postcss-font-format-keywords';
2121
import type { pluginOptions as postcssFontVariant } from '../types/postcss-font-variant/plugin-options';
2222
import type { pluginOptions as postcssGapProperties } from 'postcss-gap-properties';
23+
import type { pluginOptions as postcssGradientsInterpolationMethod } from '@csstools/postcss-gradients-interpolation-method';
2324
import type { pluginOptions as postcssHasPseudo } from 'css-has-pseudo';
2425
import type { pluginOptions as postcssColorHexAlpha } from 'postcss-color-hex-alpha';
2526
import type { pluginOptions as postcssHWBFunction } from '@csstools/postcss-hwb-function';
@@ -94,6 +95,8 @@ export type pluginsOptions = {
9495
'font-variant-property'?: postcssFontVariant | boolean
9596
/** plugin options for "postcss-gap-properties" */
9697
'gap-properties'?: postcssGapProperties | boolean
98+
/** plugin options for "@csstools/postcss-gradients-interpolation-method" */
99+
'gradients-interpolation-method'?: postcssGradientsInterpolationMethod | boolean
97100
/** plugin options for "css-has-pseudo" */
98101
'has-pseudo-class'?: postcssHasPseudo | boolean
99102
/** plugin options for "postcss-color-hex-alpha" */

plugin-packs/postcss-preset-env/test/basic.autoprefixer.expect.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,3 +576,19 @@
576576
color-5: color(display-p3 0.56492 0 0.48893 / 0.65);
577577
color-6: rgba(179, 0, 255, 0.65);
578578
}
579+
580+
.gradients-interpolation-method {
581+
--background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(164, 192, 255), rgb(137, 206, 255), rgb(111, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%);
582+
}
583+
584+
@supports (color: rgb(0 0 0 / 0)) and (color: color(display-p3 0 0 0)) {
585+
.gradients-interpolation-method {
586+
--background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), color(display-p3 0.73255 0.7035 1.03328), color(display-p3 0.66377 0.75145 1.06652), color(display-p3 0.59643 0.80011 1.0696), color(display-p3 0.54198 0.8462 1.04382), color(display-p3 0.51578 0.88643 0.99318), rgb(94, 237, 237) 100%);
587+
}
588+
}
589+
590+
@supports (background: linear-gradient(in oklch, red 0%, red 0% 1%, red 2%)) and (color: hsl(0 0% 0% / 0)) {
591+
.gradients-interpolation-method {
592+
--background-image: linear-gradient(in oklch decreasing hue, hsl(0, 85%, 75%) 0%, hsl(180, 80%, 65%) 100%);
593+
}
594+
}

plugin-packs/postcss-preset-env/test/basic.autoprefixer.false.expect.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,3 +576,19 @@
576576
color-5: color(display-p3 0.56492 0 0.48893 / 0.65);
577577
color-6: rgba(179, 0, 255, 0.65);
578578
}
579+
580+
.gradients-interpolation-method {
581+
--background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(164, 192, 255), rgb(137, 206, 255), rgb(111, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%);
582+
}
583+
584+
@supports (color: rgb(0 0 0 / 0)) and (color: color(display-p3 0 0 0)) {
585+
.gradients-interpolation-method {
586+
--background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), color(display-p3 0.73255 0.7035 1.03328), color(display-p3 0.66377 0.75145 1.06652), color(display-p3 0.59643 0.80011 1.0696), color(display-p3 0.54198 0.8462 1.04382), color(display-p3 0.51578 0.88643 0.99318), rgb(94, 237, 237) 100%);
587+
}
588+
}
589+
590+
@supports (background: linear-gradient(in oklch, red 0%, red 0% 1%, red 2%)) and (color: hsl(0 0% 0% / 0)) {
591+
.gradients-interpolation-method {
592+
--background-image: linear-gradient(in oklch decreasing hue, hsl(0, 85%, 75%) 0%, hsl(180, 80%, 65%) 100%);
593+
}
594+
}

plugin-packs/postcss-preset-env/test/basic.ch38.expect.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,3 +486,19 @@
486486
color-5: color(display-p3 0.56492 0 0.48893 / 0.65);
487487
color-6: rgba(179, 0, 255, 0.65);
488488
}
489+
490+
.gradients-interpolation-method {
491+
--background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(164, 192, 255), rgb(137, 206, 255), rgb(111, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%);
492+
}
493+
494+
@supports (color: rgb(0 0 0 / 0)) and (color: color(display-p3 0 0 0)) {
495+
.gradients-interpolation-method {
496+
--background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), color(display-p3 0.73255 0.7035 1.03328), color(display-p3 0.66377 0.75145 1.06652), color(display-p3 0.59643 0.80011 1.0696), color(display-p3 0.54198 0.8462 1.04382), color(display-p3 0.51578 0.88643 0.99318), rgb(94, 237, 237) 100%);
497+
}
498+
}
499+
500+
@supports (background: linear-gradient(in oklch, red 0%, red 0% 1%, red 2%)) and (color: hsl(0 0% 0% / 0)) {
501+
.gradients-interpolation-method {
502+
--background-image: linear-gradient(in oklch decreasing hue, hsl(0, 85%, 75%) 0%, hsl(180, 80%, 65%) 100%);
503+
}
504+
}

plugin-packs/postcss-preset-env/test/basic.ch88-ff78-saf10.expect.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,3 +482,19 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe
482482
color-5: color(display-p3 0.56492 0 0.48893 / 0.65);
483483
color-6: rgba(179, 0, 255, 0.65);
484484
}
485+
486+
.gradients-interpolation-method {
487+
--background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(164, 192, 255), rgb(137, 206, 255), rgb(111, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%);
488+
}
489+
490+
@supports (color: rgb(0 0 0 / 0)) and (color: color(display-p3 0 0 0)) {
491+
.gradients-interpolation-method {
492+
--background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), color(display-p3 0.73255 0.7035 1.03328), color(display-p3 0.66377 0.75145 1.06652), color(display-p3 0.59643 0.80011 1.0696), color(display-p3 0.54198 0.8462 1.04382), color(display-p3 0.51578 0.88643 0.99318), rgb(94, 237, 237) 100%);
493+
}
494+
}
495+
496+
@supports (background: linear-gradient(in oklch, red 0%, red 0% 1%, red 2%)) and (color: hsl(0 0% 0% / 0)) {
497+
.gradients-interpolation-method {
498+
--background-image: linear-gradient(in oklch decreasing hue, hsl(0, 85%, 75%) 0%, hsl(180, 80%, 65%) 100%);
499+
}
500+
}

plugin-packs/postcss-preset-env/test/basic.ch88-ff78.expect.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,3 +476,19 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe
476476
color-5: color(display-p3 0.56492 0 0.48893 / 0.65);
477477
color-6: rgba(179, 0, 255, 0.65);
478478
}
479+
480+
.gradients-interpolation-method {
481+
--background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(164, 192, 255), rgb(137, 206, 255), rgb(111, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%);
482+
}
483+
484+
@supports (color: rgb(0 0 0 / 0)) and (color: color(display-p3 0 0 0)) {
485+
.gradients-interpolation-method {
486+
--background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), color(display-p3 0.73255 0.7035 1.03328), color(display-p3 0.66377 0.75145 1.06652), color(display-p3 0.59643 0.80011 1.0696), color(display-p3 0.54198 0.8462 1.04382), color(display-p3 0.51578 0.88643 0.99318), rgb(94, 237, 237) 100%);
487+
}
488+
}
489+
490+
@supports (background: linear-gradient(in oklch, red 0%, red 0% 1%, red 2%)) and (color: hsl(0 0% 0% / 0)) {
491+
.gradients-interpolation-method {
492+
--background-image: linear-gradient(in oklch decreasing hue, hsl(0deg 85% 75%) 0%, hsl(180deg 80% 65%) 100%);
493+
}
494+
}

plugin-packs/postcss-preset-env/test/basic.ch88-ff78.no-is-pseudo.expect.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,3 +476,19 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe
476476
color-5: color(display-p3 0.56492 0 0.48893 / 0.65);
477477
color-6: rgba(179, 0, 255, 0.65);
478478
}
479+
480+
.gradients-interpolation-method {
481+
--background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(164, 192, 255), rgb(137, 206, 255), rgb(111, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%);
482+
}
483+
484+
@supports (color: rgb(0 0 0 / 0)) and (color: color(display-p3 0 0 0)) {
485+
.gradients-interpolation-method {
486+
--background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), color(display-p3 0.73255 0.7035 1.03328), color(display-p3 0.66377 0.75145 1.06652), color(display-p3 0.59643 0.80011 1.0696), color(display-p3 0.54198 0.8462 1.04382), color(display-p3 0.51578 0.88643 0.99318), rgb(94, 237, 237) 100%);
487+
}
488+
}
489+
490+
@supports (background: linear-gradient(in oklch, red 0%, red 0% 1%, red 2%)) and (color: hsl(0 0% 0% / 0)) {
491+
.gradients-interpolation-method {
492+
--background-image: linear-gradient(in oklch decreasing hue, hsl(0deg 85% 75%) 0%, hsl(180deg 80% 65%) 100%);
493+
}
494+
}

plugin-packs/postcss-preset-env/test/basic.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,3 +447,7 @@
447447
color-5: color-mix(in lch, rgb(255 0 0 / 0), blue 65%);
448448
color-6: color-mix(in hsl, rgb(255 0 0 / 0), blue 65%);
449449
}
450+
451+
.gradients-interpolation-method {
452+
--background-image: linear-gradient(in oklch decreasing hue, hsl(0deg 85% 75%) 0%, hsl(180deg 80% 65%) 100%);
453+
}

plugin-packs/postcss-preset-env/test/basic.expect.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,3 +596,19 @@
596596
color-5: color(display-p3 0.56492 0 0.48893 / 0.65);
597597
color-6: rgba(179, 0, 255, 0.65);
598598
}
599+
600+
.gradients-interpolation-method {
601+
--background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(164, 192, 255), rgb(137, 206, 255), rgb(111, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%);
602+
}
603+
604+
@supports (color: rgb(0 0 0 / 0)) and (color: color(display-p3 0 0 0)) {
605+
.gradients-interpolation-method {
606+
--background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), color(display-p3 0.73255 0.7035 1.03328), color(display-p3 0.66377 0.75145 1.06652), color(display-p3 0.59643 0.80011 1.0696), color(display-p3 0.54198 0.8462 1.04382), color(display-p3 0.51578 0.88643 0.99318), rgb(94, 237, 237) 100%);
607+
}
608+
}
609+
610+
@supports (background: linear-gradient(in oklch, red 0%, red 0% 1%, red 2%)) and (color: hsl(0 0% 0% / 0)) {
611+
.gradients-interpolation-method {
612+
--background-image: linear-gradient(in oklch decreasing hue, hsl(0, 85%, 75%) 0%, hsl(180, 80%, 65%) 100%);
613+
}
614+
}

plugin-packs/postcss-preset-env/test/basic.ff49.expect.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,3 +487,19 @@
487487
color-5: color(display-p3 0.56492 0 0.48893 / 0.65);
488488
color-6: rgba(179, 0, 255, 0.65);
489489
}
490+
491+
.gradients-interpolation-method {
492+
--background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(164, 192, 255), rgb(137, 206, 255), rgb(111, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%);
493+
}
494+
495+
@supports (color: rgb(0 0 0 / 0)) and (color: color(display-p3 0 0 0)) {
496+
.gradients-interpolation-method {
497+
--background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), color(display-p3 0.73255 0.7035 1.03328), color(display-p3 0.66377 0.75145 1.06652), color(display-p3 0.59643 0.80011 1.0696), color(display-p3 0.54198 0.8462 1.04382), color(display-p3 0.51578 0.88643 0.99318), rgb(94, 237, 237) 100%);
498+
}
499+
}
500+
501+
@supports (background: linear-gradient(in oklch, red 0%, red 0% 1%, red 2%)) and (color: hsl(0 0% 0% / 0)) {
502+
.gradients-interpolation-method {
503+
--background-image: linear-gradient(in oklch decreasing hue, hsl(0, 85%, 75%) 0%, hsl(180, 80%, 65%) 100%);
504+
}
505+
}

0 commit comments

Comments
 (0)