@csstools/postcss-progressive-custom-properties 5.0.0 → 5.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,10 +1,33 @@
1
1
  # Changes to PostCSS Progressive Custom Properties
2
2
 
3
- ### 5.0.0
3
+ ### 5.1.1
4
4
 
5
- _January 14, 2026_
5
+ _June 28, 2026_
6
6
 
7
- - Updated: Support for Node `20.19.0` or later (major).
8
- - Removed: `commonjs` API. In supported Node versions `require(esm)` will work without needing to make code changes.
7
+ - Fix support conditions for shorthands followed by longhands.
8
+
9
+ ```css
10
+ :root {
11
+ background: var(--green);
12
+ background: image(var(--green));
13
+ background-size: 100px;
14
+ }
15
+ ```
16
+
17
+ Now preserves the `background-size` longhand in the supports condition and becomes
18
+
19
+ ```css
20
+ :root {
21
+ background: var(--green);
22
+ background-size: 100px;
23
+ }
24
+
25
+ @supports (background-image: image(red)) {
26
+ :root {
27
+ background: image(var(--green));
28
+ background-size: 100px;
29
+ }
30
+ }
31
+ ```
9
32
 
10
33
  [Full CHANGELOG](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties/CHANGELOG.md)
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import e from"postcss-value-parser";const a=["at","bottom","center","circle","closest-corner","closest-side","ellipse","farthest-corner","farthest-side","from","in","left","right","to","top"];function doublePositionGradients(e){const p=[],r=e.value.toLowerCase();if("function"===e.type&&("conic-gradient"===r||"linear-gradient"===r||"radial-gradient"===r||"repeating-conic-gradient"===r||"repeating-linear-gradient"===r||"repeating-radial-gradient"===r)){let r=0,t=!1,i=!1;e:for(let o=0;o<e.nodes.length;o++){const s=e.nodes[o];if("word"===s.type&&a.includes(s.value.toLowerCase())&&(t=!0),"div"!==s.type||","!==s.value.trim())if("word"!==s.type||"in"!==s.value.toLowerCase()){if("word"!==s.type&&"function"!==s.type||r++,i)switch(e.value.toLowerCase()){case"conic-gradient":p.push("(background: conic-gradient(in oklch, red 0deg, red 0deg 1deg, red 2deg))");break e;case"linear-gradient":p.push("(background: linear-gradient(in oklch, red 0%, red 0% 1%, red 2%))");break e;case"radial-gradient":p.push("(background: radial-gradient(in oklch, red, red 1px 2px, red 3px))");break e;case"repeating-conic-gradient":p.push("(background: repeating-conic-gradient(in oklch from 0deg, red 0deg, red 0deg 1deg, red 2deg))");break e;case"repeating-linear-gradient":p.push("(background: repeating-linear-gradient(in oklch, red 0%, red 0% 1%, red 2%))");break e;case"repeating-radial-gradient":p.push("(background: repeating-radial-gradient(in oklch, red, red 1px 2px, red 3px))");break e}if(!t&&3===r)switch(e.value.toLowerCase()){case"conic-gradient":p.push("(background: conic-gradient(red 0deg, red 0deg 1deg, red 2deg))");break e;case"linear-gradient":p.push("(background: linear-gradient(red 0%, red 0% 1%, red 2%))");break e;case"radial-gradient":p.push("(background: radial-gradient(red, red 1px 2px, red 3px))");break e;case"repeating-conic-gradient":p.push("(background: repeating-conic-gradient(from 0deg, red 0deg, red 0deg 1deg, red 2deg))");break e;case"repeating-linear-gradient":p.push("(background: repeating-linear-gradient(red 0%, red 0% 1%, red 2%))");break e;case"repeating-radial-gradient":p.push("(background: repeating-radial-gradient(red, red 1px 2px, red 3px))");break e}}else i=!0;else r=0,t=!1}}return p}const p=[{supports:"color-mix(in display-p3-linear, red, blue)",property:"color",sniff:"color-mix(",matchers:[{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",value:"display-p3-linear"},{type:"div",value:","},{type:"word",anyRemainingArguments:!0}],unclosed:!0}]},{supports:"color-mix(in lch, red, blue)",property:"color",sniff:"color-mix(",matchers:[{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",value:"hue"},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",value:"hue"},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",value:"hue"},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",value:"hue"},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]}]},{supports:"color-mix(in lch, red)",property:"color",sniff:"color-mix(",matchers:[{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",value:"hue"},{type:"div",value:","},{type:"word",isVariable:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",value:"hue"},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",anyRemainingArguments:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",anyRemainingArguments:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",anyRemainingArguments:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",anyRemainingArguments:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",value:"hue"},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",anyRemainingArguments:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",value:"hue"},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",anyRemainingArguments:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",value:"hue"},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",anyRemainingArguments:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",value:"hue"},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",anyRemainingArguments:!0}]}]},{supports:"color-mix(red, blue)",property:"color",sniff:"color-mix(",matchers:[{type:"function",value:"color-mix",nodes:[{type:"word",anyRemainingArguments:!0}]}]},{supports:"color(from red display-p3-linear r g b)",property:"color",sniff:"display-p3-linear",matchers:[{type:"function",value:"color",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",value:"display-p3-linear"},{type:"space"},{type:"word",anyRemainingArguments:!0}]}]},{supports:"lab(from red l 1 1% / calc(alpha + 0.1))",property:"color",sniff:"from ",matchers:[{type:"function",value:"rgb",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"rgb",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]},{type:"function",value:"rgba",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"rgba",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]},{type:"function",value:"hsl",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"hsl",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]},{type:"function",value:"hsla",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"hsla",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]},{type:"function",value:"hwb",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"hwb",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]},{type:"function",value:"lch",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"lch",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]},{type:"function",value:"oklch",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"oklch",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]},{type:"function",value:"lab",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"lab",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]},{type:"function",value:"oklab",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"oklab",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]},{type:"function",value:"color",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"color(display-p3 0 0 0%)",property:"color",sniff:"color(",matchers:[{type:"function",value:"color",nodes:[{type:"word",value:"srgb"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color",nodes:[{type:"word",value:"srgb"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"color(display-p3 0 0 0%)",property:"color",sniff:"color(",matchers:[{type:"function",value:"color",nodes:[{type:"word",value:"display-p3"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color",nodes:[{type:"word",value:"display-p3"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"color(xyz 0 0 0%)",property:"color",sniff:"color(",matchers:[{type:"function",value:"color",nodes:[{type:"word",value:"srgb-linear"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color",nodes:[{type:"word",value:"srgb-linear"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"color(xyz 0 0 0%)",property:"color",sniff:"color(",matchers:[{type:"function",value:"color",nodes:[{type:"word",value:"a98-rgb"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color",nodes:[{type:"word",value:"a98-rgb"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"color(xyz 0 0 0%)",property:"color",sniff:"color(",matchers:[{type:"function",value:"color",nodes:[{type:"word",value:"prophoto-rgb"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color",nodes:[{type:"word",value:"prophoto-rgb"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"color(xyz 0 0 0%)",property:"color",sniff:"color(",matchers:[{type:"function",value:"color",nodes:[{type:"word",value:"rec2020"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color",nodes:[{type:"word",value:"rec2020"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"color(xyz 0 0 0%)",property:"color",sniff:"color(",matchers:[{type:"function",value:"color",nodes:[{type:"word",value:"xyz-d50"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color",nodes:[{type:"word",value:"xyz-d50"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"color(xyz 0 0 0%)",property:"color",sniff:"color(",matchers:[{type:"function",value:"color",nodes:[{type:"word",value:"xyz-d65"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color",nodes:[{type:"word",value:"xyz-d65"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"color(xyz 0 0 0%)",property:"color",sniff:"color(",matchers:[{type:"function",value:"color",nodes:[{type:"word",value:"xyz"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color",nodes:[{type:"word",value:"xyz"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"color(display-p3-linear 0 0 0)",property:"color",sniff:"color(",matchers:[{type:"function",value:"color",nodes:[{type:"word",value:"display-p3-linear"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color",nodes:[{type:"word",value:"display-p3-linear"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"hsl(0, 0%, 0%)",property:"color",sniff:"hsl(",matchers:[{type:"function",value:"hsl",nodes:[{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0}]}]},{supports:"hsl(0 0% 0% / 0)",property:"color",sniff:"hsl(",matchers:[{type:"function",value:"hsl",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"hsl",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"hsla(0 0% 0% / 0)",property:"color",sniff:"hsla(",matchers:[{type:"function",value:"hsla",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"hwb(0 0% 0%)",property:"color",sniff:"hwb(",matchers:[{type:"function",value:"hwb",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"hwb",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"lab(0% 0 0%)",property:"color",sniff:"lab(",matchers:[{type:"function",value:"lab",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"lab",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"lab(0% 0 0%)",property:"color",sniff:"lch(",matchers:[{type:"function",value:"lch",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"lch",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"oklab(0% 0 0%)",property:"color",sniff:"oklab(",matchers:[{type:"function",value:"oklab",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"oklab",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"oklab(0% 0 0%)",property:"color",sniff:"oklch(",matchers:[{type:"function",value:"oklch",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"oklch",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"rgb(0, 0, 0, 0)",property:"color",sniff:"rgb(",matchers:[{type:"function",value:"rgb",nodes:[{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0}]}]},{supports:"rgb(0 0 0 / 0)",property:"color",sniff:"rgb(",matchers:[{type:"function",value:"rgb",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"rgb",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"rgba(0 0 0 / 0)",property:"color",sniff:"rgba(",matchers:[{type:"function",value:"rgba",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"light-dark(red, red)",property:"color",sniff:"light-dark(",matchers:[{type:"function",value:"light-dark",nodes:[{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0}]}]},{supports:"contrast-color(red)",property:"color",sniff:"contrast-color(",matchers:[{type:"function",value:"contrast-color",nodes:[{type:"word",isVariable:!0}]}]},{supports:"alpha(from red / 1)",property:"color",sniff:"alpha(",matchers:[{type:"function",value:"alpha",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"alpha",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"1ic",property:"font-size",sniff:"ic",matchers:[{type:"word",value:"1ic",dimension:{unit:"ic"}}]},{supports:'"a" / "a"',property:"content",only_on_property:"content",sniff:"/",matchers:[{type:"div",value:"/"}]}];function matches(e,a){if(e.isVariable&&a&&("word"===a.type||"string"===a.type||"function"===a.type))return!0;if(e.type!==a.type)return!1;if(doesNotMatchValue(e,a))return!1;if(e.nodes&&a.nodes){for(let p=0;p<Math.max(e.nodes.length,a.nodes.length);p++){let r=p,t=p;for(;e.nodes[r]&&"space"===e.nodes[r].type;)r++;for(;a.nodes[t]&&"space"===a.nodes[t].type;)t++;if(!!e.nodes[r]!=!!a.nodes[t])return!1;if(e.nodes[r].anyRemainingArguments&&a.nodes[t])return!0;if(!matches(e.nodes[r],a.nodes[t]))return!1}return!0}return!0}function doesNotMatchValue(e,a){return("space"!==e.type||"space"!==a.type||e.value?.trim()!==a.value?.trim())&&(e.dimension&&a.dimension?e.dimension.unit!==a.dimension.unit:"string"===e.type?e.value!==a.value:e.value?.toLowerCase()!==a.value?.toLowerCase())}const r=/^var$/i;function conditionsFromValue(a,t=!1){const i=a.value,o=[],s=p.filter(e=>i.includes(e.sniff)&&(e.only_on_property??a.prop)===a.prop);let y=!1;try{e(i).walk(a=>{"function"===a.type&&r.test(a.value)&&(y=!0);try{const p=e.unit(a.value);!1!==p&&(a.dimension=p)}catch{}for(let e=0;e<s.length;e++){const p=s[e];for(let e=0;e<p.matchers.length;e++){if(matches(p.matchers[e],a))return void o.push(`(${p.property}: ${p.supports})`)}}o.push(...doublePositionGradients(a))})}catch{}return t&&!y?{support:[]}:{support:Array.from(new Set(o)).sort()}}const t=/var\(/i,i=/^initial$/i,o=/^\s*$/,creator=()=>({postcssPlugin:"postcss-progressive-custom-properties",prepare(){const e=new WeakMap;return{postcssPlugin:"postcss-progressive-custom-properties",OnceExit(a,{postcss:p}){a.walkDecls(a=>{if(!a.parent)return;const r=e.get(a.parent)||{conditionalRules:[],propNames:new Set,lastConditionParams:{support:void 0},lastConditionalRule:void 0};if(e.set(a.parent,r),a.variable){if(!r.propNames.has(a.prop))return void r.propNames.add(a.prop)}else{const e=a.prop.toLowerCase();if(!r.propNames.has(e))return void r.propNames.add(e)}if(!a.variable&&!t.test(a.value))return;if(i.test(a.value))return;if(o.test(a.value))return;const s=conditionsFromValue(a,!a.variable).support.join(" and ");if(!s)return;if(r.lastConditionParams.support!==s&&(r.lastConditionalRule=void 0),r.lastConditionalRule)return r.lastConditionalRule.append(a.clone()),void a.remove();const y=[];if(s&&y.push(p.atRule({name:"supports",params:s,source:a.parent.source,raws:{before:"\n\n",after:"\n"}})),!y.length)return;for(let e=0;e<y.length-1;e++){const a=y[e],p=y[e+1];a.append(p)}const l=y[0],d=y[y.length-1],n=a.parent.clone();n.removeAll(),n.raws.before="\n",n.append(a.clone()),a.remove(),r.lastConditionParams.support=s,r.lastConditionalRule=n,d.append(n),r.conditionalRules.push(l)}),a.walk(a=>{const p=e.get(a);p&&0!==p.conditionalRules.length&&p.conditionalRules.reverse().forEach(e=>{a.after(e)})})}}}});creator.postcss=!0;export{creator as default,creator as"module.exports"};
1
+ import e from"postcss-value-parser";const r=["at","bottom","center","circle","closest-corner","closest-side","ellipse","farthest-corner","farthest-side","from","in","left","right","to","top"];function doublePositionGradients(e){const t=[],o=e.value.toLowerCase();if("function"===e.type&&("conic-gradient"===o||"linear-gradient"===o||"radial-gradient"===o||"repeating-conic-gradient"===o||"repeating-linear-gradient"===o||"repeating-radial-gradient"===o)){let o=0,a=!1,i=!1;e:for(let s=0;s<e.nodes.length;s++){const n=e.nodes[s];if("word"===n.type&&r.includes(n.value.toLowerCase())&&(a=!0),"div"!==n.type||","!==n.value.trim())if("word"!==n.type||"in"!==n.value.toLowerCase()){if("word"!==n.type&&"function"!==n.type||o++,i)switch(e.value.toLowerCase()){case"conic-gradient":t.push("(background: conic-gradient(in oklch, red 0deg, red 0deg 1deg, red 2deg))");break e;case"linear-gradient":t.push("(background: linear-gradient(in oklch, red 0%, red 0% 1%, red 2%))");break e;case"radial-gradient":t.push("(background: radial-gradient(in oklch, red, red 1px 2px, red 3px))");break e;case"repeating-conic-gradient":t.push("(background: repeating-conic-gradient(in oklch from 0deg, red 0deg, red 0deg 1deg, red 2deg))");break e;case"repeating-linear-gradient":t.push("(background: repeating-linear-gradient(in oklch, red 0%, red 0% 1%, red 2%))");break e;case"repeating-radial-gradient":t.push("(background: repeating-radial-gradient(in oklch, red, red 1px 2px, red 3px))");break e}if(!a&&3===o)switch(e.value.toLowerCase()){case"conic-gradient":t.push("(background: conic-gradient(red 0deg, red 0deg 1deg, red 2deg))");break e;case"linear-gradient":t.push("(background: linear-gradient(red 0%, red 0% 1%, red 2%))");break e;case"radial-gradient":t.push("(background: radial-gradient(red, red 1px 2px, red 3px))");break e;case"repeating-conic-gradient":t.push("(background: repeating-conic-gradient(from 0deg, red 0deg, red 0deg 1deg, red 2deg))");break e;case"repeating-linear-gradient":t.push("(background: repeating-linear-gradient(red 0%, red 0% 1%, red 2%))");break e;case"repeating-radial-gradient":t.push("(background: repeating-radial-gradient(red, red 1px 2px, red 3px))");break e}}else i=!0;else o=0,a=!1}}return t}const t=[{supports:"color-mix(in display-p3-linear, red, blue)",property:"color",sniff:"color-mix(",matchers:[{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",value:"display-p3-linear"},{type:"div",value:","},{type:"word",anyRemainingArguments:!0}],unclosed:!0}]},{supports:"color-mix(in lch, red, blue)",property:"color",sniff:"color-mix(",matchers:[{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",value:"hue"},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",value:"hue"},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",value:"hue"},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",value:"hue"},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]}]},{supports:"color-mix(in lch, red)",property:"color",sniff:"color-mix(",matchers:[{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",value:"hue"},{type:"div",value:","},{type:"word",isVariable:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",value:"hue"},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",anyRemainingArguments:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",anyRemainingArguments:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",anyRemainingArguments:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",anyRemainingArguments:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",value:"hue"},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",anyRemainingArguments:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",value:"hue"},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",anyRemainingArguments:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",value:"hue"},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",anyRemainingArguments:!0}]},{type:"function",value:"color-mix",nodes:[{type:"word",value:"in"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",value:"hue"},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",anyRemainingArguments:!0}]}]},{supports:"color-mix(red, blue)",property:"color",sniff:"color-mix(",matchers:[{type:"function",value:"color-mix",nodes:[{type:"word",anyRemainingArguments:!0}]}]},{supports:"color(from red display-p3-linear r g b)",property:"color",sniff:"display-p3-linear",matchers:[{type:"function",value:"color",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",value:"display-p3-linear"},{type:"space"},{type:"word",anyRemainingArguments:!0}]}]},{supports:"lab(from red l 1 1% / calc(alpha + 0.1))",property:"color",sniff:"from ",matchers:[{type:"function",value:"rgb",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"rgb",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]},{type:"function",value:"rgba",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"rgba",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]},{type:"function",value:"hsl",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"hsl",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]},{type:"function",value:"hsla",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"hsla",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]},{type:"function",value:"hwb",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"hwb",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]},{type:"function",value:"lch",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"lch",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]},{type:"function",value:"oklch",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"oklch",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]},{type:"function",value:"lab",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"lab",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]},{type:"function",value:"oklab",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"oklab",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]},{type:"function",value:"color",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"color(display-p3 0 0 0%)",property:"color",sniff:"color(",matchers:[{type:"function",value:"color",nodes:[{type:"word",value:"srgb"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color",nodes:[{type:"word",value:"srgb"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"color(display-p3 0 0 0%)",property:"color",sniff:"color(",matchers:[{type:"function",value:"color",nodes:[{type:"word",value:"display-p3"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color",nodes:[{type:"word",value:"display-p3"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"color(xyz 0 0 0%)",property:"color",sniff:"color(",matchers:[{type:"function",value:"color",nodes:[{type:"word",value:"srgb-linear"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color",nodes:[{type:"word",value:"srgb-linear"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"color(xyz 0 0 0%)",property:"color",sniff:"color(",matchers:[{type:"function",value:"color",nodes:[{type:"word",value:"a98-rgb"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color",nodes:[{type:"word",value:"a98-rgb"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"color(xyz 0 0 0%)",property:"color",sniff:"color(",matchers:[{type:"function",value:"color",nodes:[{type:"word",value:"prophoto-rgb"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color",nodes:[{type:"word",value:"prophoto-rgb"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"color(xyz 0 0 0%)",property:"color",sniff:"color(",matchers:[{type:"function",value:"color",nodes:[{type:"word",value:"rec2020"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color",nodes:[{type:"word",value:"rec2020"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"color(xyz 0 0 0%)",property:"color",sniff:"color(",matchers:[{type:"function",value:"color",nodes:[{type:"word",value:"xyz-d50"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color",nodes:[{type:"word",value:"xyz-d50"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"color(xyz 0 0 0%)",property:"color",sniff:"color(",matchers:[{type:"function",value:"color",nodes:[{type:"word",value:"xyz-d65"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color",nodes:[{type:"word",value:"xyz-d65"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"color(xyz 0 0 0%)",property:"color",sniff:"color(",matchers:[{type:"function",value:"color",nodes:[{type:"word",value:"xyz"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color",nodes:[{type:"word",value:"xyz"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"color(display-p3-linear 0 0 0)",property:"color",sniff:"color(",matchers:[{type:"function",value:"color",nodes:[{type:"word",value:"display-p3-linear"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"color",nodes:[{type:"word",value:"display-p3-linear"},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"hsl(0, 0%, 0%)",property:"color",sniff:"hsl(",matchers:[{type:"function",value:"hsl",nodes:[{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0}]}]},{supports:"hsl(0 0% 0% / 0)",property:"color",sniff:"hsl(",matchers:[{type:"function",value:"hsl",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"hsl",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"hsla(0 0% 0% / 0)",property:"color",sniff:"hsla(",matchers:[{type:"function",value:"hsla",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"hwb(0 0% 0%)",property:"color",sniff:"hwb(",matchers:[{type:"function",value:"hwb",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"hwb",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"lab(0% 0 0%)",property:"color",sniff:"lab(",matchers:[{type:"function",value:"lab",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"lab",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"lab(0% 0 0%)",property:"color",sniff:"lch(",matchers:[{type:"function",value:"lch",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"lch",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"oklab(0% 0 0%)",property:"color",sniff:"oklab(",matchers:[{type:"function",value:"oklab",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"oklab",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"oklab(0% 0 0%)",property:"color",sniff:"oklch(",matchers:[{type:"function",value:"oklch",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"oklch",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"rgb(0, 0, 0, 0)",property:"color",sniff:"rgb(",matchers:[{type:"function",value:"rgb",nodes:[{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0}]}]},{supports:"rgb(0 0 0 / 0)",property:"color",sniff:"rgb(",matchers:[{type:"function",value:"rgb",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"rgb",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"rgba(0 0 0 / 0)",property:"color",sniff:"rgba(",matchers:[{type:"function",value:"rgba",nodes:[{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"light-dark(red, red)",property:"color",sniff:"light-dark(",matchers:[{type:"function",value:"light-dark",nodes:[{type:"word",isVariable:!0},{type:"div",value:","},{type:"word",isVariable:!0}]}]},{supports:"contrast-color(red)",property:"color",sniff:"contrast-color(",matchers:[{type:"function",value:"contrast-color",nodes:[{type:"word",isVariable:!0}]}]},{supports:"alpha(from red / 1)",property:"color",sniff:"alpha(",matchers:[{type:"function",value:"alpha",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0}]},{type:"function",value:"alpha",nodes:[{type:"word",value:"from"},{type:"space"},{type:"word",isVariable:!0},{type:"div",value:"/"},{type:"word",isVariable:!0}]}]},{supports:"1ic",property:"font-size",sniff:"ic",matchers:[{type:"word",value:"1ic",dimension:{unit:"ic"}}]},{supports:'"a" / "a"',property:"content",only_on_property:"content",sniff:"/",matchers:[{type:"div",value:"/"}]},{supports:"image(red)",property:"background-image",sniff:"image(",matchers:[{type:"function",value:"image",nodes:[{type:"word",isVariable:!0}]}]}];function matches(e,r){if(e.isVariable&&r&&("word"===r.type||"string"===r.type||"function"===r.type))return!0;if(e.type!==r.type)return!1;if(doesNotMatchValue(e,r))return!1;if(e.nodes&&r.nodes){for(let t=0;t<Math.max(e.nodes.length,r.nodes.length);t++){let o=t,a=t;for(;e.nodes[o]&&"space"===e.nodes[o].type;)o++;for(;r.nodes[a]&&"space"===r.nodes[a].type;)a++;if(!!e.nodes[o]!=!!r.nodes[a])return!1;if(e.nodes[o].anyRemainingArguments&&r.nodes[a])return!0;if(!matches(e.nodes[o],r.nodes[a]))return!1}return!0}return!0}function doesNotMatchValue(e,r){return("space"!==e.type||"space"!==r.type||e.value?.trim()!==r.value?.trim())&&(e.dimension&&r.dimension?e.dimension.unit!==r.dimension.unit:"string"===e.type?e.value!==r.value:e.value?.toLowerCase()!==r.value?.toLowerCase())}const o=/^var$/i;function conditionsFromValue(r,a=!1){const i=r.value,s=[],n=t.filter(e=>i.includes(e.sniff)&&(e.only_on_property??r.prop)===r.prop);let p=!1;try{e(i).walk(r=>{"function"===r.type&&o.test(r.value)&&(p=!0);try{const t=e.unit(r.value);!1!==t&&(r.dimension=t)}catch{}for(let e=0;e<n.length;e++){const t=n[e];for(let e=0;e<t.matchers.length;e++){if(matches(t.matchers[e],r))return void s.push(`(${t.property}: ${t.supports})`)}}s.push(...doublePositionGradients(r))})}catch{}return a&&!p?{support:[]}:{support:Array.from(new Set(s)).sort()}}const a=new Map([["animation",["animation-name","animation-duration","animation-timing-function","animation-delay","animation-iteration-count","animation-direction","animation-fill-mode","animation-play-state","animation-timeline","animation-range","animation-trigger","animation-range-start","animation-range-end"]],["animation-range",["animation-range-start","animation-range-end"]],["background",["background-image","background-position","background-size","background-repeat","background-attachment","background-origin","background-clip","background-color","background-blend-mode","background-repeat-block","background-repeat-inline","background-repeat-x","background-repeat-y","background-position-x","background-position-y","background-position-block","background-position-inline"]],["background-position",["background-position-x","background-position-y","background-position-block","background-position-inline"]],["background-repeat",["background-repeat-block","background-repeat-inline","background-repeat-x","background-repeat-y"]],["size",["block-size","height","inline-size","width"]],["block-step",["block-step-size","block-step-insert","block-step-align","block-step-round"]],["border",["border-width","border-style","border-color","border-image","border-image-source","border-image-slice","border-image-width","border-image-outset","border-image-repeat","border-block-end-color","border-block-start-color","border-bottom-color","border-top-color","border-right-color","border-left-color","border-inline-end-color","border-inline-start-color","border-block-end-style","border-block-start-style","border-bottom-style","border-inline-end-style","border-inline-start-style","border-left-style","border-right-style","border-top-style","border-block-end-width","border-block-start-width","border-bottom-width","border-inline-end-width","border-inline-start-width","border-left-width","border-right-width","border-top-width"]],["border-block",["border-block-start","border-block-end","border-block-end-width","border-block-end-style","border-block-end-color","border-block-start-width","border-block-start-style","border-block-start-color"]],["border-block-clip",["border-block-start-clip","border-block-end-clip"]],["border-block-color",["border-block-start-color","border-block-end-color"]],["border-block-end",["border-block-end-width","border-block-end-style","border-block-end-color"]],["border-clip",["border-block-end-clip","border-block-start-clip","border-bottom-clip","border-top-clip","border-right-clip","border-left-clip","border-inline-end-clip","border-inline-start-clip"]],["border-color",["border-block-end-color","border-block-start-color","border-bottom-color","border-top-color","border-right-color","border-left-color","border-inline-end-color","border-inline-start-color"]],["border-block-end-radius",["border-end-start-radius","border-end-end-radius"]],["border-style",["border-block-end-style","border-block-start-style","border-bottom-style","border-inline-end-style","border-inline-start-style","border-left-style","border-right-style","border-top-style"]],["border-width",["border-block-end-width","border-block-start-width","border-bottom-width","border-inline-end-width","border-inline-start-width","border-left-width","border-right-width","border-top-width"]],["border-block-start",["border-block-start-width","border-block-start-style","border-block-start-color"]],["border-block-start-radius",["border-start-start-radius","border-start-end-radius"]],["border-block-style",["border-block-start-style","border-block-end-style"]],["border-block-width",["border-block-start-width","border-block-end-width"]],["border-bottom",["border-bottom-width","border-bottom-style","border-bottom-color"]],["border-radius",["border-bottom-left-radius","border-bottom-right-radius","border-end-end-radius","border-end-start-radius","border-top-left-radius","border-top-right-radius","border-start-end-radius","border-start-start-radius"]],["border-bottom-radius",["border-bottom-left-radius","border-bottom-right-radius"]],["border-image",["border-image-source","border-image-slice","border-image-width","border-image-outset","border-image-repeat"]],["border-inline",["border-inline-start","border-inline-end","border-inline-end-width","border-inline-end-style","border-inline-end-color","border-inline-start-width","border-inline-start-style","border-inline-start-color"]],["border-inline-clip",["border-inline-start-clip","border-inline-end-clip"]],["border-inline-color",["border-inline-start-color","border-inline-end-color"]],["border-inline-end",["border-inline-end-width","border-inline-end-style","border-inline-end-color"]],["border-inline-end-radius",["border-start-end-radius","border-end-end-radius"]],["border-inline-start",["border-inline-start-width","border-inline-start-style","border-inline-start-color"]],["border-inline-start-radius",["border-start-start-radius","border-end-start-radius"]],["border-inline-style",["border-inline-start-style","border-inline-end-style"]],["border-inline-width",["border-inline-start-width","border-inline-end-width"]],["border-left",["border-left-width","border-left-style","border-left-color"]],["border-left-radius",["border-top-left-radius","border-bottom-left-radius"]],["border-right",["border-right-width","border-right-style","border-right-color"]],["border-right-radius",["border-top-right-radius","border-bottom-right-radius"]],["border-top",["border-top-width","border-top-style","border-top-color"]],["border-top-radius",["border-top-left-radius","border-top-right-radius"]],["inset",["bottom","top","right","left","inset-block-end","inset-block-start","inset-inline-end","inset-inline-start"]],["box-shadow",["box-shadow-color","box-shadow-offset","box-shadow-blur","box-shadow-spread","box-shadow-position"]],["caret",["caret-color","caret-animation","caret-shape"]],["color-adjust",["print-color-adjust"]],["column-rule",["column-rule-width","column-rule-style","column-rule-color"]],["column-rule-inset",["column-rule-inset-cap-start","column-rule-inset-cap-end","column-rule-inset-junction-start","column-rule-inset-junction-end"]],["column-rule-inset-cap",["column-rule-inset-cap-start","column-rule-inset-cap-end"]],["column-rule-inset-end",["column-rule-inset-cap-end","column-rule-inset-junction-end"]],["column-rule-inset-junction",["column-rule-inset-junction-start","column-rule-inset-junction-end"]],["column-rule-inset-start",["column-rule-inset-cap-start","column-rule-inset-junction-start"]],["columns",["column-width","column-count","column-height"]],["contain-intrinsic-size",["contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-width"]],["container",["container-name","container-type"]],["corner",["border-radius","corner-shape","corner-bottom-left-shape","corner-bottom-right-shape","corner-end-end-shape","corner-end-start-shape","corner-top-left-shape","corner-top-right-shape","corner-start-end-shape","corner-start-start-shape","border-bottom-left-radius","border-bottom-right-radius","border-end-end-radius","border-end-start-radius","border-top-left-radius","border-top-right-radius","border-start-end-radius","border-start-start-radius"]],["corner-block-end",["border-block-end-radius","corner-block-end-shape","corner-end-start-shape","corner-end-end-shape","border-end-start-radius","border-end-end-radius"]],["corner-block-end-shape",["corner-end-start-shape","corner-end-end-shape"]],["corner-block-start",["border-block-start-radius","corner-block-start-shape","corner-start-start-shape","corner-start-end-shape","border-start-start-radius","border-start-end-radius"]],["corner-block-start-shape",["corner-start-start-shape","corner-start-end-shape"]],["corner-bottom",["border-bottom-radius","corner-bottom-shape","corner-bottom-left-shape","corner-bottom-right-shape","border-bottom-left-radius","border-bottom-right-radius"]],["corner-bottom-left",["border-bottom-left-radius","corner-bottom-left-shape"]],["corner-shape",["corner-bottom-left-shape","corner-bottom-right-shape","corner-end-end-shape","corner-end-start-shape","corner-top-left-shape","corner-top-right-shape","corner-start-end-shape","corner-start-start-shape"]],["corner-bottom-right",["border-bottom-right-radius","corner-bottom-right-shape"]],["corner-bottom-shape",["corner-bottom-left-shape","corner-bottom-right-shape"]],["corner-end-end",["border-end-end-radius","corner-end-end-shape"]],["corner-end-start",["border-end-start-radius","corner-end-start-shape"]],["corner-inline-end",["border-inline-end-radius","corner-inline-end-shape","corner-start-end-shape","corner-end-end-shape","border-start-end-radius","border-end-end-radius"]],["corner-inline-end-shape",["corner-start-end-shape","corner-end-end-shape"]],["corner-inline-start",["border-inline-start-radius","corner-inline-start-shape","corner-start-start-shape","corner-end-start-shape","border-start-start-radius","border-end-start-radius"]],["corner-inline-start-shape",["corner-start-start-shape","corner-end-start-shape"]],["corner-left",["border-left-radius","corner-left-shape","corner-top-left-shape","corner-bottom-left-shape","border-top-left-radius","border-bottom-left-radius"]],["corner-left-shape",["corner-top-left-shape","corner-bottom-left-shape"]],["corner-right",["border-right-radius","corner-right-shape","corner-top-right-shape","corner-bottom-right-shape","border-top-right-radius","border-bottom-right-radius"]],["corner-right-shape",["corner-top-right-shape","corner-bottom-right-shape"]],["corner-start-end",["border-start-end-radius","corner-start-end-shape"]],["corner-start-start",["border-start-start-radius","corner-start-start-shape"]],["corner-top",["border-top-radius","corner-top-shape","corner-top-left-shape","corner-top-right-shape","border-top-left-radius","border-top-right-radius"]],["corner-top-left",["border-top-left-radius","corner-top-left-shape"]],["corner-top-right",["border-top-right-radius","corner-top-right-shape"]],["corner-top-shape",["corner-top-left-shape","corner-top-right-shape"]],["cue",["cue-before","cue-after"]],["flex",["flex-grow","flex-shrink","flex-basis"]],["flex-flow",["flex-direction","flex-wrap"]],["font",["font-style","font-variant","font-weight","font-stretch","font-size","line-height","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size-adjust","font-variation-settings","font-variant-ligatures","font-variant-caps","font-variant-alternates","font-variant-numeric","font-variant-east-asian","font-variant-position","font-variant-emoji"]],["font-synthesis",["font-synthesis-weight","font-synthesis-style","font-synthesis-small-caps"]],["font-variant",["font-variant-ligatures","font-variant-caps","font-variant-alternates","font-variant-numeric","font-variant-east-asian","font-variant-position","font-variant-emoji"]],["gap",["row-gap","column-gap"]],["grid",["grid-template-rows","grid-template-columns","grid-template-areas","grid-auto-rows","grid-auto-columns","grid-auto-flow"]],["grid-area",["grid-row-start","grid-column-start","grid-row-end","grid-column-end"]],["grid-column",["grid-column-start","grid-column-end"]],["grid-gap",["row-gap","column-gap"]],["grid-row",["grid-row-start","grid-row-end"]],["grid-template",["grid-template-rows","grid-template-columns","grid-template-areas"]],["inset-block",["inset-block-start","inset-block-end"]],["inset-inline",["inset-inline-start","inset-inline-end"]],["interest-delay",["interest-delay-start","interest-delay-end"]],["line-clamp",["max-lines","block-ellipsis","continue"]],["list-style",["list-style-type","list-style-position","list-style-image"]],["margin",["margin-top","margin-right","margin-bottom","margin-left","margin-block-end","margin-block-start","margin-inline-end","margin-inline-start"]],["margin-block",["margin-block-start","margin-block-end"]],["margin-inline",["margin-inline-start","margin-inline-end"]],["marker",["marker-start","marker-mid","marker-end"]],["mask",["mask-image","mask-position","mask-size","mask-repeat","mask-origin","mask-clip","mask-composite","mask-mode","mask-border","mask-border-source","mask-border-slice","mask-border-width","mask-border-outset","mask-border-repeat","mask-border-mode"]],["mask-border",["mask-border-source","mask-border-slice","mask-border-width","mask-border-outset","mask-border-repeat","mask-border-mode"]],["max-size",["max-block-size","max-height","max-inline-size","max-width"]],["min-size",["min-block-size","min-height","min-inline-size","min-width"]],["offset",["offset-path","offset-distance","offset-rotate","offset-anchor","offset-position"]],["outline",["outline-width","outline-style","outline-color"]],["overflow",["overflow-x","overflow-y","overflow-block","overflow-inline"]],["overflow-clip-margin",["overflow-clip-margin-top","overflow-clip-margin-right","overflow-clip-margin-bottom","overflow-clip-margin-left","overflow-clip-margin-block-end","overflow-clip-margin-block-start","overflow-clip-margin-inline-end","overflow-clip-margin-inline-start"]],["overflow-clip-margin-block",["overflow-clip-margin-block-start","overflow-clip-margin-block-end"]],["overflow-clip-margin-inline",["overflow-clip-margin-inline-start","overflow-clip-margin-inline-end"]],["overscroll-behavior",["overscroll-behavior-x","overscroll-behavior-y","overscroll-behavior-block","overscroll-behavior-inline"]],["padding",["padding-top","padding-right","padding-bottom","padding-left","padding-block-end","padding-block-start","padding-inline-end","padding-inline-start"]],["padding-block",["padding-block-start","padding-block-end"]],["padding-inline",["padding-inline-start","padding-inline-end"]],["pause",["pause-before","pause-after"]],["place-content",["align-content","justify-content"]],["place-items",["align-items","justify-items"]],["place-self",["align-self","justify-self"]],["pointer-timeline",["pointer-timeline-name","pointer-timeline-axis"]],["position-try",["position-try-order","position-try-fallbacks"]],["rest",["rest-before","rest-after"]],["row-rule",["row-rule-width","row-rule-style","row-rule-color"]],["row-rule-inset",["row-rule-inset-cap-start","row-rule-inset-cap-end","row-rule-inset-junction-start","row-rule-inset-junction-end"]],["row-rule-inset-cap",["row-rule-inset-cap-start","row-rule-inset-cap-end"]],["row-rule-inset-end",["row-rule-inset-cap-end","row-rule-inset-junction-end"]],["row-rule-inset-junction",["row-rule-inset-junction-start","row-rule-inset-junction-end"]],["row-rule-inset-start",["row-rule-inset-cap-start","row-rule-inset-junction-start"]],["rule",["column-rule","row-rule","row-rule-width","row-rule-style","row-rule-color","column-rule-width","column-rule-style","column-rule-color"]],["rule-break",["column-rule-break","row-rule-break"]],["rule-color",["column-rule-color","row-rule-color"]],["rule-inset",["column-rule-inset","row-rule-inset","row-rule-inset-cap-start","row-rule-inset-cap-end","row-rule-inset-junction-start","row-rule-inset-junction-end","column-rule-inset-cap-start","column-rule-inset-cap-end","column-rule-inset-junction-start","column-rule-inset-junction-end"]],["rule-inset-cap",["column-rule-inset-cap","column-rule-inset-cap-start","column-rule-inset-cap-end"]],["rule-inset-end",["column-rule-inset-end","row-rule-inset-end","row-rule-inset-cap-end","row-rule-inset-junction-end","column-rule-inset-cap-end","column-rule-inset-junction-end"]],["rule-inset-junction",["column-rule-inset-junction","column-rule-inset-junction-start","column-rule-inset-junction-end"]],["rule-inset-start",["column-rule-inset-start","row-rule-inset-start","row-rule-inset-cap-start","row-rule-inset-junction-start","column-rule-inset-cap-start","column-rule-inset-junction-start"]],["rule-style",["column-rule-style","row-rule-style"]],["rule-visibility-items",["column-rule-visibility-items"]],["rule-width",["column-rule-width","row-rule-width"]],["scroll-margin",["scroll-margin-top","scroll-margin-right","scroll-margin-bottom","scroll-margin-left","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-inline-end","scroll-margin-inline-start"]],["scroll-margin-block",["scroll-margin-block-start","scroll-margin-block-end"]],["scroll-margin-inline",["scroll-margin-inline-start","scroll-margin-inline-end"]],["scroll-padding",["scroll-padding-top","scroll-padding-right","scroll-padding-bottom","scroll-padding-left","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-inline-end","scroll-padding-inline-start"]],["scroll-padding-block",["scroll-padding-block-start","scroll-padding-block-end"]],["scroll-padding-inline",["scroll-padding-inline-start","scroll-padding-inline-end"]],["scroll-timeline",["scroll-timeline-name","scroll-timeline-axis"]],["text-align",["text-align-all","text-align-last"]],["text-decoration",["text-decoration-line","text-decoration-thickness","text-decoration-style","text-decoration-color"]],["text-decoration-skip",["text-decoration-skip-self","text-decoration-skip-box","text-decoration-skip-spaces","text-decoration-skip-ink"]],["text-emphasis",["text-emphasis-style","text-emphasis-color"]],["text-spacing",["text-spacing-trim","text-autospace"]],["text-wrap",["text-wrap-mode","text-wrap-style"]],["timeline-trigger",["timeline-trigger-name","timeline-trigger-source","timeline-trigger-activation-range","timeline-trigger-active-range","timeline-trigger-active-range-start","timeline-trigger-active-range-end","timeline-trigger-activation-range-start","timeline-trigger-activation-range-end"]],["timeline-trigger-activation-range",["timeline-trigger-activation-range-start","timeline-trigger-activation-range-end"]],["timeline-trigger-active-range",["timeline-trigger-active-range-start","timeline-trigger-active-range-end"]],["transition",["transition-property","transition-duration","transition-timing-function","transition-delay","transition-behavior"]],["vertical-align",["alignment-baseline","baseline-shift","baseline-source"]],["view-timeline",["view-timeline-name","view-timeline-axis"]],["white-space",["white-space-collapse","text-wrap-mode"]]]),i=/var\(/i,s=/^initial$/i,n=/^\s*$/;function cloneDeclarations(e,r){const t=a.get(r.prop.toLowerCase());if(!t?.length)return void e.append(r.clone());const o=[r];let i=r.next();for(;i;)"decl"===i.type&&t.includes(i.prop)&&o.push(i),i=i.next();o.forEach(r=>{e.append(r.clone())})}const creator=()=>({postcssPlugin:"postcss-progressive-custom-properties",prepare(){const e=new WeakMap;return{postcssPlugin:"postcss-progressive-custom-properties",OnceExit(r,{postcss:t}){r.walkDecls(r=>{if(!r.parent)return;const o=e.get(r.parent)||{conditionalRules:[],propNames:new Set,lastConditionParams:{support:void 0},lastConditionalRule:void 0};if(e.set(r.parent,o),r.variable){if(!o.propNames.has(r.prop))return void o.propNames.add(r.prop)}else{const e=r.prop.toLowerCase();if(!o.propNames.has(e))return void o.propNames.add(e)}if(!r.variable&&!i.test(r.value))return;if(s.test(r.value))return;if(n.test(r.value))return;const a=conditionsFromValue(r,!r.variable).support.join(" and ");if(!a)return;if(o.lastConditionParams.support!==a&&(o.lastConditionalRule=void 0),o.lastConditionalRule)return cloneDeclarations(o.lastConditionalRule,r),void r.remove();const p=[];if(a&&p.push(t.atRule({name:"supports",params:a,source:r.parent.source,raws:{before:"\n\n",after:"\n"}})),!p.length)return;for(let e=0;e<p.length-1;e++){const r=p[e],t=p[e+1];r.append(t)}const l=p[0],d=p[p.length-1],c=r.parent.clone();c.removeAll(),c.raws.before="\n",cloneDeclarations(c,r),r.remove(),o.lastConditionParams.support=a,o.lastConditionalRule=c,d.append(c),o.conditionalRules.push(l)}),r.walk(r=>{const t=e.get(r);t&&0!==t.conditionalRules.length&&t.conditionalRules.reverse().forEach(e=>{r.after(e)})})}}}});creator.postcss=!0;export{creator as default,creator as"module.exports"};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@csstools/postcss-progressive-custom-properties",
3
3
  "description": "Correctly declare progressive enhancements for CSS Custom Properties.",
4
- "version": "5.0.0",
4
+ "version": "5.1.1",
5
5
  "author": "Jonathan Neal <jonathantneal@hotmail.com>",
6
6
  "license": "MIT-0",
7
7
  "funding": [