From 68741d336fef584264da4f983b0312d5673a18d5 Mon Sep 17 00:00:00 2001 From: Romain Menke Date: Wed, 13 May 2026 15:00:45 +0200 Subject: [PATCH 1/8] postcss-container-rule-prelude-list and postcss-image-function --- .github/ISSUE_TEMPLATE/css-issue.yml | 2 + .github/ISSUE_TEMPLATE/plugin-issue.yml | 2 + .github/labeler.yml | 12 + package-lock.json | 56 +++++ .../.gitignore | 6 + .../.nvmrc | 1 + .../CHANGELOG.md | 5 + .../INSTALL.md | 235 ++++++++++++++++++ .../LICENSE.md | 18 ++ .../README.md | 106 ++++++++ .../api-extractor.json | 4 + .../dist/index.d.ts | 13 + .../dist/index.mjs | 1 + .../docs/README.md | 54 ++++ .../package.json | 83 +++++++ .../src/index.ts | 47 ++++ .../test/_import.mjs | 10 + .../test/_require.cjs | 9 + .../test/_tape.mjs | 23 ++ .../test/basic.css | 29 +++ .../test/basic.expect.css | 47 ++++ .../test/basic.preserve-true.expect.css | 59 +++++ .../test/examples/example.css | 5 + .../test/examples/example.expect.css | 10 + .../examples/example.preserve-true.expect.css | 15 ++ .../tsconfig.json | 11 + plugins/postcss-image-function/.gitignore | 6 + plugins/postcss-image-function/.nvmrc | 1 + plugins/postcss-image-function/CHANGELOG.md | 5 + plugins/postcss-image-function/INSTALL.md | 235 ++++++++++++++++++ plugins/postcss-image-function/LICENSE.md | 18 ++ plugins/postcss-image-function/README.md | 106 ++++++++ .../postcss-image-function/api-extractor.json | 4 + .../postcss-image-function/dist/index.d.ts | 22 ++ plugins/postcss-image-function/dist/index.mjs | 1 + plugins/postcss-image-function/docs/README.md | 54 ++++ plugins/postcss-image-function/package.json | 85 +++++++ plugins/postcss-image-function/src/index.ts | 106 ++++++++ .../postcss-image-function/test/_import.mjs | 10 + .../postcss-image-function/test/_require.cjs | 9 + plugins/postcss-image-function/test/_tape.mjs | 23 ++ plugins/postcss-image-function/test/basic.css | 25 ++ .../test/basic.expect.css | 25 ++ .../test/basic.preserve-true.expect.css | 33 +++ .../test/examples/example.css | 7 + .../test/examples/example.expect.css | 7 + .../examples/example.preserve-true.expect.css | 14 ++ plugins/postcss-image-function/tsconfig.json | 11 + .../CHANGELOG.md | 4 + .../dist/index.mjs | 2 +- .../scripts/image.mjs | 12 + .../scripts/matchers.mjs | 4 + .../src/matchers.ts | 17 ++ .../test/basic.css | 10 + .../test/basic.expect.css | 20 ++ rollup/configs/externals.mjs | 4 + 56 files changed, 1742 insertions(+), 1 deletion(-) create mode 100644 plugins/postcss-container-rule-prelude-list/.gitignore create mode 100644 plugins/postcss-container-rule-prelude-list/.nvmrc create mode 100644 plugins/postcss-container-rule-prelude-list/CHANGELOG.md create mode 100644 plugins/postcss-container-rule-prelude-list/INSTALL.md create mode 100644 plugins/postcss-container-rule-prelude-list/LICENSE.md create mode 100644 plugins/postcss-container-rule-prelude-list/README.md create mode 100644 plugins/postcss-container-rule-prelude-list/api-extractor.json create mode 100644 plugins/postcss-container-rule-prelude-list/dist/index.d.ts create mode 100644 plugins/postcss-container-rule-prelude-list/dist/index.mjs create mode 100644 plugins/postcss-container-rule-prelude-list/docs/README.md create mode 100644 plugins/postcss-container-rule-prelude-list/package.json create mode 100644 plugins/postcss-container-rule-prelude-list/src/index.ts create mode 100644 plugins/postcss-container-rule-prelude-list/test/_import.mjs create mode 100644 plugins/postcss-container-rule-prelude-list/test/_require.cjs create mode 100644 plugins/postcss-container-rule-prelude-list/test/_tape.mjs create mode 100644 plugins/postcss-container-rule-prelude-list/test/basic.css create mode 100644 plugins/postcss-container-rule-prelude-list/test/basic.expect.css create mode 100644 plugins/postcss-container-rule-prelude-list/test/basic.preserve-true.expect.css create mode 100644 plugins/postcss-container-rule-prelude-list/test/examples/example.css create mode 100644 plugins/postcss-container-rule-prelude-list/test/examples/example.expect.css create mode 100644 plugins/postcss-container-rule-prelude-list/test/examples/example.preserve-true.expect.css create mode 100644 plugins/postcss-container-rule-prelude-list/tsconfig.json create mode 100644 plugins/postcss-image-function/.gitignore create mode 100644 plugins/postcss-image-function/.nvmrc create mode 100644 plugins/postcss-image-function/CHANGELOG.md create mode 100644 plugins/postcss-image-function/INSTALL.md create mode 100644 plugins/postcss-image-function/LICENSE.md create mode 100644 plugins/postcss-image-function/README.md create mode 100644 plugins/postcss-image-function/api-extractor.json create mode 100644 plugins/postcss-image-function/dist/index.d.ts create mode 100644 plugins/postcss-image-function/dist/index.mjs create mode 100644 plugins/postcss-image-function/docs/README.md create mode 100644 plugins/postcss-image-function/package.json create mode 100644 plugins/postcss-image-function/src/index.ts create mode 100644 plugins/postcss-image-function/test/_import.mjs create mode 100644 plugins/postcss-image-function/test/_require.cjs create mode 100644 plugins/postcss-image-function/test/_tape.mjs create mode 100644 plugins/postcss-image-function/test/basic.css create mode 100644 plugins/postcss-image-function/test/basic.expect.css create mode 100644 plugins/postcss-image-function/test/basic.preserve-true.expect.css create mode 100644 plugins/postcss-image-function/test/examples/example.css create mode 100644 plugins/postcss-image-function/test/examples/example.expect.css create mode 100644 plugins/postcss-image-function/test/examples/example.preserve-true.expect.css create mode 100644 plugins/postcss-image-function/tsconfig.json create mode 100644 plugins/postcss-progressive-custom-properties/scripts/image.mjs diff --git a/.github/ISSUE_TEMPLATE/css-issue.yml b/.github/ISSUE_TEMPLATE/css-issue.yml index af32318b34..3f646df0d8 100644 --- a/.github/ISSUE_TEMPLATE/css-issue.yml +++ b/.github/ISSUE_TEMPLATE/css-issue.yml @@ -79,6 +79,7 @@ body: - PostCSS Color Mix Function - PostCSS Color Mix Variadic Function Arguments - PostCSS Conditional Values + - PostCSS Container Rule Prelude List - PostCSS Content Alt Text - PostCSS Contrast Color Functions - PostCSS Custom Media Queries @@ -100,6 +101,7 @@ body: - PostCSS Gradients Interpolation Method - PostCSS HWB Function - PostCSS IC Unit + - PostCSS Image Function - PostCSS Image Set Function - PostCSS Initial - PostCSS Is Pseudo Class diff --git a/.github/ISSUE_TEMPLATE/plugin-issue.yml b/.github/ISSUE_TEMPLATE/plugin-issue.yml index a3c99c2849..6d28b74b0b 100644 --- a/.github/ISSUE_TEMPLATE/plugin-issue.yml +++ b/.github/ISSUE_TEMPLATE/plugin-issue.yml @@ -76,6 +76,7 @@ body: - PostCSS Color Mix Function - PostCSS Color Mix Variadic Function Arguments - PostCSS Conditional Values + - PostCSS Container Rule Prelude List - PostCSS Content Alt Text - PostCSS Contrast Color Functions - PostCSS Custom Media Queries @@ -97,6 +98,7 @@ body: - PostCSS Gradients Interpolation Method - PostCSS HWB Function - PostCSS IC Unit + - PostCSS Image Function - PostCSS Image Set Function - PostCSS Initial - PostCSS Is Pseudo Class diff --git a/.github/labeler.yml b/.github/labeler.yml index fdf0307fa5..adb04495f5 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -143,6 +143,12 @@ - plugins/postcss-conditional-values/** - experimental/postcss-conditional-values/** +"plugins/postcss-container-rule-prelude-list": + - changed-files: + - any-glob-to-any-file: + - plugins/postcss-container-rule-prelude-list/** + - experimental/postcss-container-rule-prelude-list/** + "plugins/postcss-content-alt-text": - changed-files: - any-glob-to-any-file: @@ -275,6 +281,12 @@ - plugins/postcss-ic-unit/** - experimental/postcss-ic-unit/** +"plugins/postcss-image-function": + - changed-files: + - any-glob-to-any-file: + - plugins/postcss-image-function/** + - experimental/postcss-image-function/** + "plugins/postcss-image-set-function": - changed-files: - any-glob-to-any-file: diff --git a/package-lock.json b/package-lock.json index c929202cb7..e94675ee22 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1990,6 +1990,10 @@ "resolved": "plugins/postcss-conditional-values", "link": true }, + "node_modules/@csstools/postcss-container-rule-prelude-list": { + "resolved": "plugins/postcss-container-rule-prelude-list", + "link": true + }, "node_modules/@csstools/postcss-content-alt-text": { "resolved": "plugins/postcss-content-alt-text", "link": true @@ -2046,6 +2050,10 @@ "resolved": "plugins/postcss-ic-unit", "link": true }, + "node_modules/@csstools/postcss-image-function": { + "resolved": "plugins/postcss-image-function", + "link": true + }, "node_modules/@csstools/postcss-initial": { "resolved": "plugins/postcss-initial", "link": true @@ -11007,6 +11015,30 @@ "postcss": "^8.4" } }, + "plugins/postcss-container-rule-prelude-list": { + "name": "@csstools/postcss-container-rule-prelude-list", + "version": "0.0.0", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "devDependencies": { + "@csstools/postcss-tape": "*" + }, + "engines": { + "node": ">=20.19.0" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, "plugins/postcss-content-alt-text": { "name": "@csstools/postcss-content-alt-text", "version": "3.0.0", @@ -11627,6 +11659,30 @@ "postcss": "^8.4" } }, + "plugins/postcss-image-function": { + "name": "@csstools/postcss-image-function", + "version": "0.0.0", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "devDependencies": { + "@csstools/postcss-tape": "*" + }, + "engines": { + "node": ">=20.19.0" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, "plugins/postcss-image-set-function": { "version": "8.0.0", "funding": [ diff --git a/plugins/postcss-container-rule-prelude-list/.gitignore b/plugins/postcss-container-rule-prelude-list/.gitignore new file mode 100644 index 0000000000..e5b28db4ad --- /dev/null +++ b/plugins/postcss-container-rule-prelude-list/.gitignore @@ -0,0 +1,6 @@ +node_modules +package-lock.json +yarn.lock +*.result.css +*.result.css.map +*.result.html diff --git a/plugins/postcss-container-rule-prelude-list/.nvmrc b/plugins/postcss-container-rule-prelude-list/.nvmrc new file mode 100644 index 0000000000..28d6ff1c82 --- /dev/null +++ b/plugins/postcss-container-rule-prelude-list/.nvmrc @@ -0,0 +1 @@ +v25.1.0 diff --git a/plugins/postcss-container-rule-prelude-list/CHANGELOG.md b/plugins/postcss-container-rule-prelude-list/CHANGELOG.md new file mode 100644 index 0000000000..d799b3cfed --- /dev/null +++ b/plugins/postcss-container-rule-prelude-list/CHANGELOG.md @@ -0,0 +1,5 @@ +# Changes to PostCSS Container Rule Prelude List + +### Unreleased (major) + +- Initial version diff --git a/plugins/postcss-container-rule-prelude-list/INSTALL.md b/plugins/postcss-container-rule-prelude-list/INSTALL.md new file mode 100644 index 0000000000..13d54a8cca --- /dev/null +++ b/plugins/postcss-container-rule-prelude-list/INSTALL.md @@ -0,0 +1,235 @@ +# Installing PostCSS Container Rule Prelude List + +[PostCSS Container Rule Prelude List] runs in all Node environments, with special instructions for: + +- [Node](#node) +- [PostCSS CLI](#postcss-cli) +- [PostCSS Load Config](#postcss-load-config) +- [Webpack](#webpack) +- [Next.js](#nextjs) +- [Gulp](#gulp) +- [Grunt](#grunt) + + + +## Node + +Add [PostCSS Container Rule Prelude List] to your project: + +```bash +npm install postcss @csstools/postcss-container-rule-prelude-list --save-dev +``` + +Use it as a [PostCSS] plugin: + +```js +// commonjs +const postcss = require('postcss'); +const postcssContainerRulePreludeList = require('@csstools/postcss-container-rule-prelude-list'); + +postcss([ + postcssContainerRulePreludeList(/* pluginOptions */) +]).process(YOUR_CSS /*, processOptions */); +``` + +```js +// esm +import postcss from 'postcss'; +import postcssContainerRulePreludeList from '@csstools/postcss-container-rule-prelude-list'; + +postcss([ + postcssContainerRulePreludeList(/* pluginOptions */) +]).process(YOUR_CSS /*, processOptions */); +``` + +## PostCSS CLI + +Add [PostCSS CLI] to your project: + +```bash +npm install postcss-cli @csstools/postcss-container-rule-prelude-list --save-dev +``` + +Use [PostCSS Container Rule Prelude List] in your `postcss.config.js` configuration file: + +```js +const postcssContainerRulePreludeList = require('@csstools/postcss-container-rule-prelude-list'); + +module.exports = { + plugins: [ + postcssContainerRulePreludeList(/* pluginOptions */) + ] +} +``` + +## PostCSS Load Config + +If your framework/CLI supports [`postcss-load-config`](https://github.com/postcss/postcss-load-config). + +```bash +npm install @csstools/postcss-container-rule-prelude-list --save-dev +``` + +`package.json`: + +```json +{ + "postcss": { + "plugins": { + "@csstools/postcss-container-rule-prelude-list": {} + } + } +} +``` + +`.postcssrc.json`: + +```json +{ + "plugins": { + "@csstools/postcss-container-rule-prelude-list": {} + } +} +``` + +_See the [README of `postcss-load-config`](https://github.com/postcss/postcss-load-config#usage) for more usage options._ + +## Webpack + +_Webpack version 5_ + +Add [PostCSS Loader] to your project: + +```bash +npm install postcss-loader @csstools/postcss-container-rule-prelude-list --save-dev +``` + +Use [PostCSS Container Rule Prelude List] in your Webpack configuration: + +```js +module.exports = { + module: { + rules: [ + { + test: /\.css$/i, + use: [ + "style-loader", + { + loader: "css-loader", + options: { importLoaders: 1 }, + }, + { + loader: "postcss-loader", + options: { + postcssOptions: { + plugins: [ + // Other plugins, + [ + "@csstools/postcss-container-rule-prelude-list", + { + // Options + }, + ], + ], + }, + }, + }, + ], + }, + ], + }, +}; +``` + +## Next.js + +Read the instructions on how to [customize the PostCSS configuration in Next.js](https://nextjs.org/docs/advanced-features/customizing-postcss-config) + +```bash +npm install @csstools/postcss-container-rule-prelude-list --save-dev +``` + +Use [PostCSS Container Rule Prelude List] in your `postcss.config.json` file: + +```json +{ + "plugins": [ + "@csstools/postcss-container-rule-prelude-list" + ] +} +``` + +```json5 +{ + "plugins": [ + [ + "@csstools/postcss-container-rule-prelude-list", + { + // Optionally add plugin options + } + ] + ] +} +``` + +## Gulp + +Add [Gulp PostCSS] to your project: + +```bash +npm install gulp-postcss @csstools/postcss-container-rule-prelude-list --save-dev +``` + +Use [PostCSS Container Rule Prelude List] in your Gulpfile: + +```js +const postcss = require('gulp-postcss'); +const postcssContainerRulePreludeList = require('@csstools/postcss-container-rule-prelude-list'); + +gulp.task('css', function () { + var plugins = [ + postcssContainerRulePreludeList(/* pluginOptions */) + ]; + + return gulp.src('./src/*.css') + .pipe(postcss(plugins)) + .pipe(gulp.dest('.')); +}); +``` + +## Grunt + +Add [Grunt PostCSS] to your project: + +```bash +npm install grunt-postcss @csstools/postcss-container-rule-prelude-list --save-dev +``` + +Use [PostCSS Container Rule Prelude List] in your Gruntfile: + +```js +const postcssContainerRulePreludeList = require('@csstools/postcss-container-rule-prelude-list'); + +grunt.loadNpmTasks('grunt-postcss'); + +grunt.initConfig({ + postcss: { + options: { + processors: [ + postcssContainerRulePreludeList(/* pluginOptions */) + ] + }, + dist: { + src: '*.css' + } + } +}); +``` + +[Gulp PostCSS]: https://github.com/postcss/gulp-postcss +[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss +[PostCSS]: https://github.com/postcss/postcss +[PostCSS CLI]: https://github.com/postcss/postcss-cli +[PostCSS Loader]: https://github.com/postcss/postcss-loader +[PostCSS Container Rule Prelude List]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-container-rule-prelude-list +[Next.js]: https://nextjs.org diff --git a/plugins/postcss-container-rule-prelude-list/LICENSE.md b/plugins/postcss-container-rule-prelude-list/LICENSE.md new file mode 100644 index 0000000000..e8ae93b9f9 --- /dev/null +++ b/plugins/postcss-container-rule-prelude-list/LICENSE.md @@ -0,0 +1,18 @@ +MIT No Attribution (MIT-0) + +Copyright © CSSTools Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the “Software”), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/plugins/postcss-container-rule-prelude-list/README.md b/plugins/postcss-container-rule-prelude-list/README.md new file mode 100644 index 0000000000..f5434d3adc --- /dev/null +++ b/plugins/postcss-container-rule-prelude-list/README.md @@ -0,0 +1,106 @@ +# PostCSS Container Rule Prelude List [PostCSS Logo][PostCSS] + +[npm version][npm-url] [Build Status][cli-url] [Discord][discord]

[Baseline Status][css-url] [CSS Standard Status][css-url] + +```bash +npm install @csstools/postcss-container-rule-prelude-list --save-dev +``` + +[PostCSS Container Rule Prelude List] lets you declare a list of container queries in a single `@container` rule following the [CSS Conditional 5 Specification]. + +```css +@container card (inline-size > 30em), style(--responsive: true) { + a { + color: red; + } +} + +/* becomes */ + +@container card (inline-size > 30em) { + a { + color: red; + } +} +@container style(--responsive: true) { + a { + color: red; + } +} +``` + +## Usage + +Add [PostCSS Container Rule Prelude List] to your project: + +```bash +npm install postcss @csstools/postcss-container-rule-prelude-list --save-dev +``` + +Use it as a [PostCSS] plugin: + +```js +const postcss = require('postcss'); +const postcssContainerRulePreludeList = require('@csstools/postcss-container-rule-prelude-list'); + +postcss([ + postcssContainerRulePreludeList(/* pluginOptions */) +]).process(YOUR_CSS /*, processOptions */); +``` + +[PostCSS Container Rule Prelude List] runs in all Node environments, with special +instructions for: + +- [Node](INSTALL.md#node) +- [PostCSS CLI](INSTALL.md#postcss-cli) +- [PostCSS Load Config](INSTALL.md#postcss-load-config) +- [Webpack](INSTALL.md#webpack) +- [Next.js](INSTALL.md#nextjs) +- [Gulp](INSTALL.md#gulp) +- [Grunt](INSTALL.md#grunt) + +## Options + +### preserve + +The `preserve` option determines whether the original notation +is preserved. By default, it is not preserved. + +```js +postcssContainerRulePreludeList({ preserve: true }) +``` + +```css +@container card (inline-size > 30em), style(--responsive: true) { + a { + color: red; + } +} + +/* becomes */ + +@container card (inline-size > 30em) { + a { + color: red; + } +} +@container style(--responsive: true) { + a { + color: red; + } +} +@container card (inline-size > 30em), style(--responsive: true) { + a { + color: red; + } +} +``` + +[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test +[css-url]: https://cssdb.org/#container-rule-prelude-list +[discord]: https://discord.gg/bUadyRwkJS +[npm-url]: https://www.npmjs.com/package/@csstools/postcss-container-rule-prelude-list + +[PostCSS]: https://github.com/postcss/postcss +[PostCSS Container Rule Prelude List]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-container-rule-prelude-list +[CSS Conditional 5 Specification]: https://drafts.csswg.org/css-conditional-5/#container-rule diff --git a/plugins/postcss-container-rule-prelude-list/api-extractor.json b/plugins/postcss-container-rule-prelude-list/api-extractor.json new file mode 100644 index 0000000000..42058be517 --- /dev/null +++ b/plugins/postcss-container-rule-prelude-list/api-extractor.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "extends": "../../api-extractor.json" +} diff --git a/plugins/postcss-container-rule-prelude-list/dist/index.d.ts b/plugins/postcss-container-rule-prelude-list/dist/index.d.ts new file mode 100644 index 0000000000..35089e1865 --- /dev/null +++ b/plugins/postcss-container-rule-prelude-list/dist/index.d.ts @@ -0,0 +1,13 @@ +import type { PluginCreator } from 'postcss'; + +declare const creator: PluginCreator; +export default creator; +export { creator as 'module.exports' } + +/** postcss-container-rule-prelude-list plugin options */ +export declare type pluginOptions = { + /** Preserve the original notation. default: false */ + preserve?: boolean; +}; + +export { } diff --git a/plugins/postcss-container-rule-prelude-list/dist/index.mjs b/plugins/postcss-container-rule-prelude-list/dist/index.mjs new file mode 100644 index 0000000000..d2f819a9b6 --- /dev/null +++ b/plugins/postcss-container-rule-prelude-list/dist/index.mjs @@ -0,0 +1 @@ +import{parseCommaSeparatedListOfComponentValues as s,stringify as e}from"@csstools/css-parser-algorithms";import{tokenize as r}from"@csstools/css-tokenizer";const creator=o=>{const t=Object.assign({preserve:!1},o);return{postcssPlugin:"postcss-container-rule-prelude-list",AtRule(o){if(!o.params.includes(","))return;const c=s(r({css:o.params})).map(s=>e([s]));c.length<=1||(c.forEach(s=>{o.cloneBefore({params:s.trim()})}),t.preserve||o.remove())}}};creator.postcss=!0;export{creator as default,creator as"module.exports"}; diff --git a/plugins/postcss-container-rule-prelude-list/docs/README.md b/plugins/postcss-container-rule-prelude-list/docs/README.md new file mode 100644 index 0000000000..d6d0abef8e --- /dev/null +++ b/plugins/postcss-container-rule-prelude-list/docs/README.md @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + +
+ +[] lets you declare a list of container queries in a single `@container` rule following the [CSS Conditional 5 Specification]. + +```css + + +/* becomes */ + + +``` + + + + + +## Options + +### preserve + +The `preserve` option determines whether the original notation +is preserved. By default, it is not preserved. + +```js +({ preserve: true }) +``` + +```css + + +/* becomes */ + + +``` + + +[CSS Conditional 5 Specification]: diff --git a/plugins/postcss-container-rule-prelude-list/package.json b/plugins/postcss-container-rule-prelude-list/package.json new file mode 100644 index 0000000000..57c6735d00 --- /dev/null +++ b/plugins/postcss-container-rule-prelude-list/package.json @@ -0,0 +1,83 @@ +{ + "name": "@csstools/postcss-container-rule-prelude-list", + "description": "Declare a list of container queries in a single at-container rule", + "version": "0.0.0", + "contributors": [ + { + "name": "Antonio Laguna", + "email": "antonio@laguna.es", + "url": "https://antonio.laguna.es" + }, + { + "name": "Romain Menke", + "email": "romainmenke@gmail.com" + } + ], + "license": "MIT-0", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "engines": { + "node": ">=20.19.0" + }, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.mjs" + } + }, + "files": [ + "CHANGELOG.md", + "LICENSE.md", + "README.md", + "dist" + ], + "dependencies": { + "@csstools/css-parser-algorithms": "^4.0.0", + "@csstools/css-tokenizer": "^4.0.0" + }, + "peerDependencies": { + "postcss": "^8.4" + }, + "devDependencies": { + "@csstools/postcss-tape": "*" + }, + "scripts": { + "build": "rollup -c ../../rollup/default.mjs", + "docs": "node ../../.github/bin/generate-docs/install.mjs && node ../../.github/bin/generate-docs/readme.mjs", + "lint": "node ../../.github/bin/format-package-json.mjs", + "prepublishOnly": "npm run build && npm run test", + "test": "node --test", + "test:rewrite-expects": "REWRITE_EXPECTS=true node --test" + }, + "homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-container-rule-prelude-list#readme", + "repository": { + "type": "git", + "url": "git+https://github.com/csstools/postcss-plugins.git", + "directory": "plugins/postcss-container-rule-prelude-list" + }, + "bugs": "https://github.com/csstools/postcss-plugins/issues", + "keywords": [ + "container queries list", + "csswg", + "fallback", + "postcss-plugin" + ], + "csstools": { + "cssdbId": "container-rule-prelude-list", + "exportName": "postcssContainerRulePreludeList", + "humanReadableName": "PostCSS Container Rule Prelude List", + "specUrl": "https://drafts.csswg.org/css-conditional-5/#container-rule" + }, + "volta": { + "extends": "../../package.json" + } +} diff --git a/plugins/postcss-container-rule-prelude-list/src/index.ts b/plugins/postcss-container-rule-prelude-list/src/index.ts new file mode 100644 index 0000000000..9999f5bac8 --- /dev/null +++ b/plugins/postcss-container-rule-prelude-list/src/index.ts @@ -0,0 +1,47 @@ +import { parseCommaSeparatedListOfComponentValues, stringify } from '@csstools/css-parser-algorithms'; +import { tokenize } from '@csstools/css-tokenizer'; +import type { PluginCreator } from 'postcss'; + +/** postcss-container-rule-prelude-list plugin options */ +export type pluginOptions = { + /** Preserve the original notation. default: false */ + preserve?: boolean, +}; + +const creator: PluginCreator = (opts?: pluginOptions) => { + const options: pluginOptions = Object.assign( + // Default options + { + preserve: false, + }, + // Provided options + opts, + ); + + return { + postcssPlugin: 'postcss-container-rule-prelude-list', + AtRule(rule): void { + if (!rule.params.includes(',')) { + return; + } + + const list = parseCommaSeparatedListOfComponentValues(tokenize({ css: rule.params })).map((x) => stringify([x])); + if (list.length <= 1) { + return; + } + + list.forEach((item) => { + rule.cloneBefore({ params: item.trim() }); + }); + + if (!options.preserve) { + rule.remove(); + } + }, + }; +}; + +creator.postcss = true; + +export default creator; +export { creator as 'module.exports' }; diff --git a/plugins/postcss-container-rule-prelude-list/test/_import.mjs b/plugins/postcss-container-rule-prelude-list/test/_import.mjs new file mode 100644 index 0000000000..aeb4724cfd --- /dev/null +++ b/plugins/postcss-container-rule-prelude-list/test/_import.mjs @@ -0,0 +1,10 @@ +import assert from 'node:assert/strict'; +import test from 'node:test'; +import plugin from '@csstools/postcss-container-rule-prelude-list'; + +test('import', () => { + plugin(); + assert.ok(plugin.postcss, 'should have "postcss flag"'); + assert.equal(typeof plugin, 'function', 'should return a function'); +}); + diff --git a/plugins/postcss-container-rule-prelude-list/test/_require.cjs b/plugins/postcss-container-rule-prelude-list/test/_require.cjs new file mode 100644 index 0000000000..f180a44460 --- /dev/null +++ b/plugins/postcss-container-rule-prelude-list/test/_require.cjs @@ -0,0 +1,9 @@ +const assert = require('node:assert/strict'); +const test = require('node:test'); +const plugin = require('@csstools/postcss-container-rule-prelude-list'); + +test('require', () => { + plugin(); + assert.ok(plugin.postcss, 'should have "postcss flag"'); + assert.equal(typeof plugin, 'function', 'should return a function'); +}); diff --git a/plugins/postcss-container-rule-prelude-list/test/_tape.mjs b/plugins/postcss-container-rule-prelude-list/test/_tape.mjs new file mode 100644 index 0000000000..7ee8c136af --- /dev/null +++ b/plugins/postcss-container-rule-prelude-list/test/_tape.mjs @@ -0,0 +1,23 @@ +import { postcssTape } from '@csstools/postcss-tape'; +import plugin from '@csstools/postcss-container-rule-prelude-list'; + +postcssTape(plugin)({ + basic: { + message: 'supports basic usage', + }, + 'basic:preserve-true': { + message: 'supports { preserve: true }', + options: { + preserve: true, + }, + }, + 'examples/example': { + message: 'minimal example', + }, + 'examples/example:preserve-true': { + message: 'minimal example', + options: { + preserve: true, + }, + }, +}); diff --git a/plugins/postcss-container-rule-prelude-list/test/basic.css b/plugins/postcss-container-rule-prelude-list/test/basic.css new file mode 100644 index 0000000000..e2600cee6f --- /dev/null +++ b/plugins/postcss-container-rule-prelude-list/test/basic.css @@ -0,0 +1,29 @@ +@container card (inline-size > 30em), style(--responsive: true) { + a { + order: 1; + } +} + +@container card (inline-size > 30em), style(--responsive: true), style(--responsive: true-isch) { + b { + order: 1; + } +} + +@container foo(bar, baz) { + ignore { + order: 2; + } +} + +@container card (inline-size > 30em) { + ignore { + order: 3; + } +} + +@container { + ignore { + order: 4; + } +} diff --git a/plugins/postcss-container-rule-prelude-list/test/basic.expect.css b/plugins/postcss-container-rule-prelude-list/test/basic.expect.css new file mode 100644 index 0000000000..08b6c3d209 --- /dev/null +++ b/plugins/postcss-container-rule-prelude-list/test/basic.expect.css @@ -0,0 +1,47 @@ +@container card (inline-size > 30em) { + a { + order: 1; + } +} + +@container style(--responsive: true) { + a { + order: 1; + } +} + +@container card (inline-size > 30em) { + b { + order: 1; + } +} + +@container style(--responsive: true) { + b { + order: 1; + } +} + +@container style(--responsive: true-isch) { + b { + order: 1; + } +} + +@container foo(bar, baz) { + ignore { + order: 2; + } +} + +@container card (inline-size > 30em) { + ignore { + order: 3; + } +} + +@container { + ignore { + order: 4; + } +} diff --git a/plugins/postcss-container-rule-prelude-list/test/basic.preserve-true.expect.css b/plugins/postcss-container-rule-prelude-list/test/basic.preserve-true.expect.css new file mode 100644 index 0000000000..96b46e469d --- /dev/null +++ b/plugins/postcss-container-rule-prelude-list/test/basic.preserve-true.expect.css @@ -0,0 +1,59 @@ +@container card (inline-size > 30em) { + a { + order: 1; + } +} + +@container style(--responsive: true) { + a { + order: 1; + } +} + +@container card (inline-size > 30em), style(--responsive: true) { + a { + order: 1; + } +} + +@container card (inline-size > 30em) { + b { + order: 1; + } +} + +@container style(--responsive: true) { + b { + order: 1; + } +} + +@container style(--responsive: true-isch) { + b { + order: 1; + } +} + +@container card (inline-size > 30em), style(--responsive: true), style(--responsive: true-isch) { + b { + order: 1; + } +} + +@container foo(bar, baz) { + ignore { + order: 2; + } +} + +@container card (inline-size > 30em) { + ignore { + order: 3; + } +} + +@container { + ignore { + order: 4; + } +} diff --git a/plugins/postcss-container-rule-prelude-list/test/examples/example.css b/plugins/postcss-container-rule-prelude-list/test/examples/example.css new file mode 100644 index 0000000000..3b9a615d87 --- /dev/null +++ b/plugins/postcss-container-rule-prelude-list/test/examples/example.css @@ -0,0 +1,5 @@ +@container card (inline-size > 30em), style(--responsive: true) { + a { + color: red; + } +} diff --git a/plugins/postcss-container-rule-prelude-list/test/examples/example.expect.css b/plugins/postcss-container-rule-prelude-list/test/examples/example.expect.css new file mode 100644 index 0000000000..09ba07b0a9 --- /dev/null +++ b/plugins/postcss-container-rule-prelude-list/test/examples/example.expect.css @@ -0,0 +1,10 @@ +@container card (inline-size > 30em) { + a { + color: red; + } +} +@container style(--responsive: true) { + a { + color: red; + } +} diff --git a/plugins/postcss-container-rule-prelude-list/test/examples/example.preserve-true.expect.css b/plugins/postcss-container-rule-prelude-list/test/examples/example.preserve-true.expect.css new file mode 100644 index 0000000000..dce0a2fec8 --- /dev/null +++ b/plugins/postcss-container-rule-prelude-list/test/examples/example.preserve-true.expect.css @@ -0,0 +1,15 @@ +@container card (inline-size > 30em) { + a { + color: red; + } +} +@container style(--responsive: true) { + a { + color: red; + } +} +@container card (inline-size > 30em), style(--responsive: true) { + a { + color: red; + } +} diff --git a/plugins/postcss-container-rule-prelude-list/tsconfig.json b/plugins/postcss-container-rule-prelude-list/tsconfig.json new file mode 100644 index 0000000000..24dab9cc3d --- /dev/null +++ b/plugins/postcss-container-rule-prelude-list/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "dist", + "declarationDir": ".", + "rootDir": "./src", + "strict": true + }, + "include": ["./src/**/*"], + "exclude": ["dist"] +} diff --git a/plugins/postcss-image-function/.gitignore b/plugins/postcss-image-function/.gitignore new file mode 100644 index 0000000000..e5b28db4ad --- /dev/null +++ b/plugins/postcss-image-function/.gitignore @@ -0,0 +1,6 @@ +node_modules +package-lock.json +yarn.lock +*.result.css +*.result.css.map +*.result.html diff --git a/plugins/postcss-image-function/.nvmrc b/plugins/postcss-image-function/.nvmrc new file mode 100644 index 0000000000..28d6ff1c82 --- /dev/null +++ b/plugins/postcss-image-function/.nvmrc @@ -0,0 +1 @@ +v25.1.0 diff --git a/plugins/postcss-image-function/CHANGELOG.md b/plugins/postcss-image-function/CHANGELOG.md new file mode 100644 index 0000000000..1a6a2222dc --- /dev/null +++ b/plugins/postcss-image-function/CHANGELOG.md @@ -0,0 +1,5 @@ +# Changes to PostCSS Image Function + +### Unreleased (major) + +- Initial version diff --git a/plugins/postcss-image-function/INSTALL.md b/plugins/postcss-image-function/INSTALL.md new file mode 100644 index 0000000000..054df2d7fe --- /dev/null +++ b/plugins/postcss-image-function/INSTALL.md @@ -0,0 +1,235 @@ +# Installing PostCSS Image Function + +[PostCSS Image Function] runs in all Node environments, with special instructions for: + +- [Node](#node) +- [PostCSS CLI](#postcss-cli) +- [PostCSS Load Config](#postcss-load-config) +- [Webpack](#webpack) +- [Next.js](#nextjs) +- [Gulp](#gulp) +- [Grunt](#grunt) + + + +## Node + +Add [PostCSS Image Function] to your project: + +```bash +npm install postcss @csstools/postcss-image-function --save-dev +``` + +Use it as a [PostCSS] plugin: + +```js +// commonjs +const postcss = require('postcss'); +const postcssImageFunction = require('@csstools/postcss-image-function'); + +postcss([ + postcssImageFunction(/* pluginOptions */) +]).process(YOUR_CSS /*, processOptions */); +``` + +```js +// esm +import postcss from 'postcss'; +import postcssImageFunction from '@csstools/postcss-image-function'; + +postcss([ + postcssImageFunction(/* pluginOptions */) +]).process(YOUR_CSS /*, processOptions */); +``` + +## PostCSS CLI + +Add [PostCSS CLI] to your project: + +```bash +npm install postcss-cli @csstools/postcss-image-function --save-dev +``` + +Use [PostCSS Image Function] in your `postcss.config.js` configuration file: + +```js +const postcssImageFunction = require('@csstools/postcss-image-function'); + +module.exports = { + plugins: [ + postcssImageFunction(/* pluginOptions */) + ] +} +``` + +## PostCSS Load Config + +If your framework/CLI supports [`postcss-load-config`](https://github.com/postcss/postcss-load-config). + +```bash +npm install @csstools/postcss-image-function --save-dev +``` + +`package.json`: + +```json +{ + "postcss": { + "plugins": { + "@csstools/postcss-image-function": {} + } + } +} +``` + +`.postcssrc.json`: + +```json +{ + "plugins": { + "@csstools/postcss-image-function": {} + } +} +``` + +_See the [README of `postcss-load-config`](https://github.com/postcss/postcss-load-config#usage) for more usage options._ + +## Webpack + +_Webpack version 5_ + +Add [PostCSS Loader] to your project: + +```bash +npm install postcss-loader @csstools/postcss-image-function --save-dev +``` + +Use [PostCSS Image Function] in your Webpack configuration: + +```js +module.exports = { + module: { + rules: [ + { + test: /\.css$/i, + use: [ + "style-loader", + { + loader: "css-loader", + options: { importLoaders: 1 }, + }, + { + loader: "postcss-loader", + options: { + postcssOptions: { + plugins: [ + // Other plugins, + [ + "@csstools/postcss-image-function", + { + // Options + }, + ], + ], + }, + }, + }, + ], + }, + ], + }, +}; +``` + +## Next.js + +Read the instructions on how to [customize the PostCSS configuration in Next.js](https://nextjs.org/docs/advanced-features/customizing-postcss-config) + +```bash +npm install @csstools/postcss-image-function --save-dev +``` + +Use [PostCSS Image Function] in your `postcss.config.json` file: + +```json +{ + "plugins": [ + "@csstools/postcss-image-function" + ] +} +``` + +```json5 +{ + "plugins": [ + [ + "@csstools/postcss-image-function", + { + // Optionally add plugin options + } + ] + ] +} +``` + +## Gulp + +Add [Gulp PostCSS] to your project: + +```bash +npm install gulp-postcss @csstools/postcss-image-function --save-dev +``` + +Use [PostCSS Image Function] in your Gulpfile: + +```js +const postcss = require('gulp-postcss'); +const postcssImageFunction = require('@csstools/postcss-image-function'); + +gulp.task('css', function () { + var plugins = [ + postcssImageFunction(/* pluginOptions */) + ]; + + return gulp.src('./src/*.css') + .pipe(postcss(plugins)) + .pipe(gulp.dest('.')); +}); +``` + +## Grunt + +Add [Grunt PostCSS] to your project: + +```bash +npm install grunt-postcss @csstools/postcss-image-function --save-dev +``` + +Use [PostCSS Image Function] in your Gruntfile: + +```js +const postcssImageFunction = require('@csstools/postcss-image-function'); + +grunt.loadNpmTasks('grunt-postcss'); + +grunt.initConfig({ + postcss: { + options: { + processors: [ + postcssImageFunction(/* pluginOptions */) + ] + }, + dist: { + src: '*.css' + } + } +}); +``` + +[Gulp PostCSS]: https://github.com/postcss/gulp-postcss +[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss +[PostCSS]: https://github.com/postcss/postcss +[PostCSS CLI]: https://github.com/postcss/postcss-cli +[PostCSS Loader]: https://github.com/postcss/postcss-loader +[PostCSS Image Function]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-image-function +[Next.js]: https://nextjs.org diff --git a/plugins/postcss-image-function/LICENSE.md b/plugins/postcss-image-function/LICENSE.md new file mode 100644 index 0000000000..e8ae93b9f9 --- /dev/null +++ b/plugins/postcss-image-function/LICENSE.md @@ -0,0 +1,18 @@ +MIT No Attribution (MIT-0) + +Copyright © CSSTools Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the “Software”), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/plugins/postcss-image-function/README.md b/plugins/postcss-image-function/README.md new file mode 100644 index 0000000000..30d6b6662d --- /dev/null +++ b/plugins/postcss-image-function/README.md @@ -0,0 +1,106 @@ +# PostCSS Image Function [PostCSS Logo][PostCSS] + +[npm version][npm-url] [Build Status][cli-url] [Discord][discord]

[Baseline Status][css-url] [CSS Standard Status][css-url] + +```bash +npm install @csstools/postcss-image-function --save-dev +``` + +[PostCSS Image Function] lets you easily generate a solid-color image from any color following the [CSS Images 4 Specification]. + +```css +.foo { + background-image: image(transparent); +} + +.foo { + --bg-image: image(transparent); +} + +/* becomes */ + +.foo { + background-image: linear-gradient(transparent,transparent); +} + +.foo { + --bg-image: linear-gradient(transparent,transparent); +} +``` + +## Usage + +Add [PostCSS Image Function] to your project: + +```bash +npm install postcss @csstools/postcss-image-function --save-dev +``` + +Use it as a [PostCSS] plugin: + +```js +const postcss = require('postcss'); +const postcssImageFunction = require('@csstools/postcss-image-function'); + +postcss([ + postcssImageFunction(/* pluginOptions */) +]).process(YOUR_CSS /*, processOptions */); +``` + +[PostCSS Image Function] runs in all Node environments, with special +instructions for: + +- [Node](INSTALL.md#node) +- [PostCSS CLI](INSTALL.md#postcss-cli) +- [PostCSS Load Config](INSTALL.md#postcss-load-config) +- [Webpack](INSTALL.md#webpack) +- [Next.js](INSTALL.md#nextjs) +- [Gulp](INSTALL.md#gulp) +- [Grunt](INSTALL.md#grunt) + +## Options + +### preserve + +The `preserve` option determines whether the original notation +is preserved. By default, it is not preserved. + +```js +postcssImageFunction({ preserve: true }) +``` + +```css +.foo { + background-image: image(transparent); +} + +.foo { + --bg-image: image(transparent); +} + +/* becomes */ + +.foo { + background-image: linear-gradient(transparent,transparent); + background-image: image(transparent); +} + +.foo { + --bg-image: linear-gradient(transparent,transparent); +} + +@supports (background-image: image(red)) { +.foo { + --bg-image: image(transparent); +} +} +``` + +[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test +[css-url]: https://cssdb.org/#image-function +[discord]: https://discord.gg/bUadyRwkJS +[npm-url]: https://www.npmjs.com/package/@csstools/postcss-image-function + +[PostCSS]: https://github.com/postcss/postcss +[PostCSS Image Function]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-image-function +[CSS Images 4 Specification]: https://drafts.csswg.org/css-images-4/#funcdef-image diff --git a/plugins/postcss-image-function/api-extractor.json b/plugins/postcss-image-function/api-extractor.json new file mode 100644 index 0000000000..42058be517 --- /dev/null +++ b/plugins/postcss-image-function/api-extractor.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "extends": "../../api-extractor.json" +} diff --git a/plugins/postcss-image-function/dist/index.d.ts b/plugins/postcss-image-function/dist/index.d.ts new file mode 100644 index 0000000000..801a02d2f5 --- /dev/null +++ b/plugins/postcss-image-function/dist/index.d.ts @@ -0,0 +1,22 @@ +import type { PluginCreator } from 'postcss'; + +/** postcss-image-function plugin options */ +export declare type basePluginOptions = { + /** Preserve the original notation. default: false */ + preserve?: boolean; +}; + +/** postcss-image-function plugin options */ +export declare type pluginOptions = { + /** Preserve the original notation. default: false */ + preserve?: boolean; + /** Enable "@csstools/postcss-progressive-custom-properties". default: true */ + enableProgressiveCustomProperties?: boolean; +}; + +/** Transform image() functions in CSS. */ +declare const postcssPlugin: PluginCreator; +export default postcssPlugin; +export { postcssPlugin as 'module.exports' } + +export { } diff --git a/plugins/postcss-image-function/dist/index.mjs b/plugins/postcss-image-function/dist/index.mjs new file mode 100644 index 0000000000..515cfdaf53 --- /dev/null +++ b/plugins/postcss-image-function/dist/index.mjs @@ -0,0 +1 @@ +import e from"@csstools/postcss-progressive-custom-properties";import{hasFallback as s,hasSupportsAtRuleAncestor as o}from"@csstools/utilities";import{replaceComponentValues as t,parseCommaSeparatedListOfComponentValues as r,isFunctionNode as i,isWhiteSpaceOrCommentNode as n,FunctionNode as a,TokenNode as c,stringify as l}from"@csstools/css-parser-algorithms";import{tokenize as m,TokenType as p}from"@csstools/css-tokenizer";const u=/\bimage\(/i,g=/^image$/i,basePlugin=e=>({postcssPlugin:"postcss-image-function",Declaration(v){const f=v.value;if(!u.test(f))return;if(s(v))return;if(o(v,u))return;const d=t(r(m({css:f})),e=>{if(i(e)&&g.test(e.getName())&&1===e.value.filter(e=>!n(e)).length)return new a([p.Function,"linear-gradient(",e.name[2],e.name[3],{value:"linear-gradient"}],e.endToken,[...e.value,new c([p.Comma,",",e.name[2],e.name[3],void 0]),...e.value])}),P=l(d);P!==f&&(v.cloneBefore({value:P}),e?.preserve||v.remove())}});basePlugin.postcss=!0;const postcssPlugin=s=>{const o=Object.assign({preserve:!1,enableProgressiveCustomProperties:!0},s);return o.enableProgressiveCustomProperties&&o.preserve?{postcssPlugin:"postcss-image-function",plugins:[e(),basePlugin(o)]}:basePlugin(o)};postcssPlugin.postcss=!0;export{postcssPlugin as default,postcssPlugin as"module.exports"}; diff --git a/plugins/postcss-image-function/docs/README.md b/plugins/postcss-image-function/docs/README.md new file mode 100644 index 0000000000..f833061aa9 --- /dev/null +++ b/plugins/postcss-image-function/docs/README.md @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + +
+ +[] lets you easily generate a solid-color image from any color following the [CSS Images 4 Specification]. + +```css + + +/* becomes */ + + +``` + + + + + +## Options + +### preserve + +The `preserve` option determines whether the original notation +is preserved. By default, it is not preserved. + +```js +({ preserve: true }) +``` + +```css + + +/* becomes */ + + +``` + + +[CSS Images 4 Specification]: diff --git a/plugins/postcss-image-function/package.json b/plugins/postcss-image-function/package.json new file mode 100644 index 0000000000..620f5be6bc --- /dev/null +++ b/plugins/postcss-image-function/package.json @@ -0,0 +1,85 @@ +{ + "name": "@csstools/postcss-image-function", + "description": "Generate a solid-color image from any color", + "version": "0.0.0", + "contributors": [ + { + "name": "Antonio Laguna", + "email": "antonio@laguna.es", + "url": "https://antonio.laguna.es" + }, + { + "name": "Romain Menke", + "email": "romainmenke@gmail.com" + } + ], + "license": "MIT-0", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "engines": { + "node": ">=20.19.0" + }, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.mjs" + } + }, + "files": [ + "CHANGELOG.md", + "LICENSE.md", + "README.md", + "dist" + ], + "dependencies": { + "@csstools/css-parser-algorithms": "^4.0.0", + "@csstools/css-tokenizer": "^4.0.0", + "@csstools/postcss-progressive-custom-properties": "^5.0.0", + "@csstools/utilities": "^3.0.0" + }, + "peerDependencies": { + "postcss": "^8.4" + }, + "devDependencies": { + "@csstools/postcss-tape": "*" + }, + "scripts": { + "build": "rollup -c ../../rollup/default.mjs", + "docs": "node ../../.github/bin/generate-docs/install.mjs && node ../../.github/bin/generate-docs/readme.mjs", + "lint": "node ../../.github/bin/format-package-json.mjs", + "prepublishOnly": "npm run build && npm run test", + "test": "node --test", + "test:rewrite-expects": "REWRITE_EXPECTS=true node --test" + }, + "homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-image-function#readme", + "repository": { + "type": "git", + "url": "git+https://github.com/csstools/postcss-plugins.git", + "directory": "plugins/postcss-image-function" + }, + "bugs": "https://github.com/csstools/postcss-plugins/issues", + "keywords": [ + "csswg", + "fallback", + "image function", + "postcss-plugin" + ], + "csstools": { + "cssdbId": "image-function", + "exportName": "postcssImageFunction", + "humanReadableName": "PostCSS Image Function", + "specUrl": "https://drafts.csswg.org/css-images-4/#funcdef-image" + }, + "volta": { + "extends": "../../package.json" + } +} diff --git a/plugins/postcss-image-function/src/index.ts b/plugins/postcss-image-function/src/index.ts new file mode 100644 index 0000000000..5ca9e3f29b --- /dev/null +++ b/plugins/postcss-image-function/src/index.ts @@ -0,0 +1,106 @@ +import postcssProgressiveCustomProperties from '@csstools/postcss-progressive-custom-properties'; +import type { Declaration, PluginCreator } from 'postcss'; +import { hasFallback, hasSupportsAtRuleAncestor } from '@csstools/utilities'; +import { FunctionNode, isFunctionNode, isWhiteSpaceOrCommentNode, parseCommaSeparatedListOfComponentValues, replaceComponentValues, stringify, TokenNode } from '@csstools/css-parser-algorithms'; +import { tokenize, TokenType } from '@csstools/css-tokenizer'; + +const IMAGE_FUNCTION_REGEX = /\bimage\(/i; +const IMAGE_NAME_REGEX = /^image$/i; + +/** postcss-image-function plugin options */ +export type basePluginOptions = { + /** Preserve the original notation. default: false */ + preserve?: boolean, +}; + +/** Transform image() functions in CSS. */ +const basePlugin: PluginCreator = (opts?: basePluginOptions) => { + return { + postcssPlugin: 'postcss-image-function', + Declaration(decl: Declaration): void { + const originalValue = decl.value; + if (!(IMAGE_FUNCTION_REGEX.test(originalValue))) { + return; + } + + if (hasFallback(decl)) { + return; + } + + if (hasSupportsAtRuleAncestor(decl, IMAGE_FUNCTION_REGEX)) { + return; + } + + const replaced = replaceComponentValues( + parseCommaSeparatedListOfComponentValues(tokenize({ css: originalValue })), + (componentValue) => { + if (!isFunctionNode(componentValue) || !IMAGE_NAME_REGEX.test(componentValue.getName())) { + return; + } + + if (componentValue.value.filter((x) => !isWhiteSpaceOrCommentNode(x)).length !== 1) { + return; + } + + return new FunctionNode( + [TokenType.Function, 'linear-gradient(', componentValue.name[2], componentValue.name[3], { value: 'linear-gradient' }], + componentValue.endToken, + [ + ...componentValue.value, + new TokenNode( + [TokenType.Comma, ',', componentValue.name[2], componentValue.name[3], undefined] + ), + ...componentValue.value, + ] + ); + }, + ); + + const modifiedValue = stringify(replaced); + if (modifiedValue === originalValue) { + return; + } + + decl.cloneBefore({ value: modifiedValue }); + + if (!opts?.preserve) { + decl.remove(); + } + }, + }; +}; + +basePlugin.postcss = true; + +/** postcss-image-function plugin options */ +export type pluginOptions = { + /** Preserve the original notation. default: false */ + preserve?: boolean, + /** Enable "@csstools/postcss-progressive-custom-properties". default: true */ + enableProgressiveCustomProperties?: boolean, +}; + +/** Transform image() functions in CSS. */ +const postcssPlugin: PluginCreator = (opts?: pluginOptions) => { + const options = Object.assign({ + preserve: false, + enableProgressiveCustomProperties: true, + }, opts); + + if (options.enableProgressiveCustomProperties && options.preserve) { + return { + postcssPlugin: 'postcss-image-function', + plugins: [ + postcssProgressiveCustomProperties(), + basePlugin(options), + ], + }; + } + + return basePlugin(options); +}; + +postcssPlugin.postcss = true; + +export default postcssPlugin; +export { postcssPlugin as 'module.exports' }; diff --git a/plugins/postcss-image-function/test/_import.mjs b/plugins/postcss-image-function/test/_import.mjs new file mode 100644 index 0000000000..6f981752ad --- /dev/null +++ b/plugins/postcss-image-function/test/_import.mjs @@ -0,0 +1,10 @@ +import assert from 'node:assert/strict'; +import test from 'node:test'; +import plugin from '@csstools/postcss-image-function'; + +test('import', () => { + plugin(); + assert.ok(plugin.postcss, 'should have "postcss flag"'); + assert.equal(typeof plugin, 'function', 'should return a function'); +}); + diff --git a/plugins/postcss-image-function/test/_require.cjs b/plugins/postcss-image-function/test/_require.cjs new file mode 100644 index 0000000000..f0b3774ce1 --- /dev/null +++ b/plugins/postcss-image-function/test/_require.cjs @@ -0,0 +1,9 @@ +const assert = require('node:assert/strict'); +const test = require('node:test'); +const plugin = require('@csstools/postcss-image-function'); + +test('require', () => { + plugin(); + assert.ok(plugin.postcss, 'should have "postcss flag"'); + assert.equal(typeof plugin, 'function', 'should return a function'); +}); diff --git a/plugins/postcss-image-function/test/_tape.mjs b/plugins/postcss-image-function/test/_tape.mjs new file mode 100644 index 0000000000..58f9f76d41 --- /dev/null +++ b/plugins/postcss-image-function/test/_tape.mjs @@ -0,0 +1,23 @@ +import { postcssTape } from '@csstools/postcss-tape'; +import plugin from '@csstools/postcss-image-function'; + +postcssTape(plugin)({ + basic: { + message: 'supports basic usage', + }, + 'basic:preserve-true': { + message: 'supports { preserve: true }', + options: { + preserve: true, + }, + }, + 'examples/example': { + message: 'minimal example', + }, + 'examples/example:preserve-true': { + message: 'minimal example', + options: { + preserve: true, + }, + }, +}); diff --git a/plugins/postcss-image-function/test/basic.css b/plugins/postcss-image-function/test/basic.css new file mode 100644 index 0000000000..354e37f09c --- /dev/null +++ b/plugins/postcss-image-function/test/basic.css @@ -0,0 +1,25 @@ +.foo { + background-image: image(rgba(0, 0, 255, .5)), url("bg-image.png"); +} + +.foo { + background-image: image(rgba(0, 0, 255, .5)), image(rgba(255, 0, 255, .5)), url("bg-image.png"); +} + +.foo { + --image: image(red); +} + +.ignore { + background-image: image(); +} + +.ignore { + background-image: image(foo bar); +} + +@supports (background: image(purple)) { + .ignore { + background-image: image(rgba(0, 0, 255, .5)), image(rgba(255, 0, 255, .5)), url("bg-image.png"); + } +} diff --git a/plugins/postcss-image-function/test/basic.expect.css b/plugins/postcss-image-function/test/basic.expect.css new file mode 100644 index 0000000000..9ac7cfbee4 --- /dev/null +++ b/plugins/postcss-image-function/test/basic.expect.css @@ -0,0 +1,25 @@ +.foo { + background-image: linear-gradient(rgba(0, 0, 255, .5),rgba(0, 0, 255, .5)), url("bg-image.png"); +} + +.foo { + background-image: linear-gradient(rgba(0, 0, 255, .5),rgba(0, 0, 255, .5)), linear-gradient(rgba(255, 0, 255, .5),rgba(255, 0, 255, .5)), url("bg-image.png"); +} + +.foo { + --image: linear-gradient(red,red); +} + +.ignore { + background-image: image(); +} + +.ignore { + background-image: image(foo bar); +} + +@supports (background: image(purple)) { + .ignore { + background-image: image(rgba(0, 0, 255, .5)), image(rgba(255, 0, 255, .5)), url("bg-image.png"); + } +} diff --git a/plugins/postcss-image-function/test/basic.preserve-true.expect.css b/plugins/postcss-image-function/test/basic.preserve-true.expect.css new file mode 100644 index 0000000000..fab696bb2f --- /dev/null +++ b/plugins/postcss-image-function/test/basic.preserve-true.expect.css @@ -0,0 +1,33 @@ +.foo { + background-image: linear-gradient(rgba(0, 0, 255, .5),rgba(0, 0, 255, .5)), url("bg-image.png"); + background-image: image(rgba(0, 0, 255, .5)), url("bg-image.png"); +} + +.foo { + background-image: linear-gradient(rgba(0, 0, 255, .5),rgba(0, 0, 255, .5)), linear-gradient(rgba(255, 0, 255, .5),rgba(255, 0, 255, .5)), url("bg-image.png"); + background-image: image(rgba(0, 0, 255, .5)), image(rgba(255, 0, 255, .5)), url("bg-image.png"); +} + +.foo { + --image: linear-gradient(red,red); +} + +@supports (background-image: image(red)) { +.foo { + --image: image(red); +} +} + +.ignore { + background-image: image(); +} + +.ignore { + background-image: image(foo bar); +} + +@supports (background: image(purple)) { + .ignore { + background-image: image(rgba(0, 0, 255, .5)), image(rgba(255, 0, 255, .5)), url("bg-image.png"); + } +} diff --git a/plugins/postcss-image-function/test/examples/example.css b/plugins/postcss-image-function/test/examples/example.css new file mode 100644 index 0000000000..b46861988e --- /dev/null +++ b/plugins/postcss-image-function/test/examples/example.css @@ -0,0 +1,7 @@ +.foo { + background-image: image(transparent); +} + +.foo { + --bg-image: image(transparent); +} diff --git a/plugins/postcss-image-function/test/examples/example.expect.css b/plugins/postcss-image-function/test/examples/example.expect.css new file mode 100644 index 0000000000..174c2c69eb --- /dev/null +++ b/plugins/postcss-image-function/test/examples/example.expect.css @@ -0,0 +1,7 @@ +.foo { + background-image: linear-gradient(transparent,transparent); +} + +.foo { + --bg-image: linear-gradient(transparent,transparent); +} diff --git a/plugins/postcss-image-function/test/examples/example.preserve-true.expect.css b/plugins/postcss-image-function/test/examples/example.preserve-true.expect.css new file mode 100644 index 0000000000..119c9a9aa8 --- /dev/null +++ b/plugins/postcss-image-function/test/examples/example.preserve-true.expect.css @@ -0,0 +1,14 @@ +.foo { + background-image: linear-gradient(transparent,transparent); + background-image: image(transparent); +} + +.foo { + --bg-image: linear-gradient(transparent,transparent); +} + +@supports (background-image: image(red)) { +.foo { + --bg-image: image(transparent); +} +} diff --git a/plugins/postcss-image-function/tsconfig.json b/plugins/postcss-image-function/tsconfig.json new file mode 100644 index 0000000000..24dab9cc3d --- /dev/null +++ b/plugins/postcss-image-function/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "dist", + "declarationDir": ".", + "rootDir": "./src", + "strict": true + }, + "include": ["./src/**/*"], + "exclude": ["dist"] +} diff --git a/plugins/postcss-progressive-custom-properties/CHANGELOG.md b/plugins/postcss-progressive-custom-properties/CHANGELOG.md index 25937af689..f177bd5f67 100644 --- a/plugins/postcss-progressive-custom-properties/CHANGELOG.md +++ b/plugins/postcss-progressive-custom-properties/CHANGELOG.md @@ -1,5 +1,9 @@ # Changes to PostCSS Progressive Custom Properties +### Unreleased (minor) + +- Add support for `image(red)` + ### 5.0.0 _January 14, 2026_ diff --git a/plugins/postcss-progressive-custom-properties/dist/index.mjs b/plugins/postcss-progressive-custom-properties/dist/index.mjs index 4e0c1118cf..8bbcbd566f 100644 --- a/plugins/postcss-progressive-custom-properties/dist/index.mjs +++ b/plugins/postcss-progressive-custom-properties/dist/index.mjs @@ -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;oi.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({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{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"}; +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;oi.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({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{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"}; diff --git a/plugins/postcss-progressive-custom-properties/scripts/image.mjs b/plugins/postcss-progressive-custom-properties/scripts/image.mjs new file mode 100644 index 0000000000..691bdddce3 --- /dev/null +++ b/plugins/postcss-progressive-custom-properties/scripts/image.mjs @@ -0,0 +1,12 @@ +import { matcherForValue } from './matcher-for-value.mjs'; + +export const imageMatchers = [ + { + 'supports': 'image(red)', + 'property': 'background-image', + 'sniff': 'image(', + 'matchers': [ + matcherForValue('image($1)'), + ], + }, +]; diff --git a/plugins/postcss-progressive-custom-properties/scripts/matchers.mjs b/plugins/postcss-progressive-custom-properties/scripts/matchers.mjs index 9d48f05aaa..3b2272bda5 100644 --- a/plugins/postcss-progressive-custom-properties/scripts/matchers.mjs +++ b/plugins/postcss-progressive-custom-properties/scripts/matchers.mjs @@ -6,6 +6,7 @@ import { lightDarkMatchers } from './light-dark.mjs'; import { relativeColorSyntaxMatches } from './relative-color-syntax.mjs'; import { contrastColorMatchers } from './contrast-color.mjs'; import { contentMatchers } from './content.mjs'; +import { imageMatchers } from './image.mjs'; fs.writeFile( './src/matchers.ts', @@ -35,6 +36,9 @@ fs.writeFile( // content: ...contentMatchers, + + // image: + ...imageMatchers, ], null, '\t', diff --git a/plugins/postcss-progressive-custom-properties/src/matchers.ts b/plugins/postcss-progressive-custom-properties/src/matchers.ts index ddcf1dcf10..f25a33899b 100644 --- a/plugins/postcss-progressive-custom-properties/src/matchers.ts +++ b/plugins/postcss-progressive-custom-properties/src/matchers.ts @@ -3407,5 +3407,22 @@ export const matchers = [ "value": "/" } ] + }, + { + "supports": "image(red)", + "property": "background-image", + "sniff": "image(", + "matchers": [ + { + "type": "function", + "value": "image", + "nodes": [ + { + "type": "word", + "isVariable": true + } + ] + } + ] } ]; \ No newline at end of file diff --git a/plugins/postcss-progressive-custom-properties/test/basic.css b/plugins/postcss-progressive-custom-properties/test/basic.css index 32ae37fd79..d8665d8ae5 100644 --- a/plugins/postcss-progressive-custom-properties/test/basic.css +++ b/plugins/postcss-progressive-custom-properties/test/basic.css @@ -296,3 +296,13 @@ content: "a" "b"; content: "a" / "b"; } + +:root { + --image-function-1: linear-gradient(red); + --image-function-1: image(red); +} + +:root { + color: var(--green); + color: image(var(--green)); +} diff --git a/plugins/postcss-progressive-custom-properties/test/basic.expect.css b/plugins/postcss-progressive-custom-properties/test/basic.expect.css index fdeb114bb0..129d928251 100644 --- a/plugins/postcss-progressive-custom-properties/test/basic.expect.css +++ b/plugins/postcss-progressive-custom-properties/test/basic.expect.css @@ -526,3 +526,23 @@ content: "a" "b"; content: "a" / "b"; } + +:root { + --image-function-1: linear-gradient(red); +} + +@supports (background-image: image(red)) { +:root { + --image-function-1: image(red); +} +} + +:root { + color: var(--green); +} + +@supports (background-image: image(red)) { +:root { + color: image(var(--green)); +} +} diff --git a/rollup/configs/externals.mjs b/rollup/configs/externals.mjs index 00f01669b6..fdd1526ccd 100644 --- a/rollup/configs/externals.mjs +++ b/rollup/configs/externals.mjs @@ -31,6 +31,7 @@ export const externalsForCLI = [ '@csstools/postcss-color-function-display-p3-linear', '@csstools/postcss-color-mix-function', '@csstools/postcss-color-mix-variadic-function-arguments', + '@csstools/postcss-container-rule-prelude-list', '@csstools/postcss-content-alt-text', '@csstools/postcss-contrast-color-function', '@csstools/postcss-exponential-functions', @@ -41,6 +42,7 @@ export const externalsForCLI = [ '@csstools/postcss-gradients-interpolation-method', '@csstools/postcss-hwb-function', '@csstools/postcss-ic-unit', + '@csstools/postcss-image-function', '@csstools/postcss-initial', '@csstools/postcss-is-pseudo-class', '@csstools/postcss-light-dark-function', @@ -145,6 +147,7 @@ export const externalsForPlugin = [ '@csstools/postcss-color-function-display-p3-linear', '@csstools/postcss-color-mix-function', '@csstools/postcss-color-mix-variadic-function-arguments', + '@csstools/postcss-container-rule-prelude-list', '@csstools/postcss-content-alt-text', '@csstools/postcss-contrast-color-function', '@csstools/postcss-exponential-functions', @@ -154,6 +157,7 @@ export const externalsForPlugin = [ '@csstools/postcss-gradients-interpolation-method', '@csstools/postcss-hwb-function', '@csstools/postcss-ic-unit', + '@csstools/postcss-image-function', '@csstools/postcss-initial', '@csstools/postcss-is-pseudo-class', '@csstools/postcss-light-dark-function', From baec9ec5cf0935a561ceb7c73ea4b781055ce33c Mon Sep 17 00:00:00 2001 From: Romain Menke Date: Wed, 13 May 2026 15:05:32 +0200 Subject: [PATCH 2/8] latest node --- .github/workflows/deploy-preset-env.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/test.yml | 8 ++++---- .nvmrc | 2 +- cli/csstools-cli/.nvmrc | 2 +- e2e-package-managers/yarn/.nvmrc | 2 +- e2e/.nvmrc | 2 +- e2e/browserslist/package-json/.nvmrc | 2 +- .../custom-media--design-tokens--global-data/.nvmrc | 2 +- e2e/postcss-cli/commonjs/.nvmrc | 2 +- e2e/postcss-cli/esm/.nvmrc | 2 +- e2e/typescript/commonjs/.nvmrc | 2 +- e2e/typescript/esm/.nvmrc | 2 +- e2e/webpack/bundle-through/.nvmrc | 2 +- e2e/webpack/postcss-loader/.nvmrc | 2 +- experimental/css-has-pseudo/.nvmrc | 2 +- experimental/postcss-gradient-stop-increments/.nvmrc | 2 +- experimental/postcss-nesting/.nvmrc | 2 +- package.json | 2 +- packages/base-cli/.nvmrc | 2 +- packages/cascade-layer-name-parser/.nvmrc | 2 +- packages/color-helpers/.nvmrc | 2 +- packages/css-calc/.nvmrc | 2 +- packages/css-color-parser/.nvmrc | 2 +- packages/css-parser-algorithms/.nvmrc | 2 +- packages/css-tokenizer/.nvmrc | 2 +- packages/generate-test-cases/.nvmrc | 2 +- packages/media-query-list-parser/.nvmrc | 2 +- packages/selector-resolve-nested/.nvmrc | 2 +- packages/selector-specificity/.nvmrc | 2 +- packages/utilities/.nvmrc | 2 +- plugin-packs/postcss-bundler/.nvmrc | 2 +- plugin-packs/postcss-preset-env/.nvmrc | 2 +- plugins/css-blank-pseudo/.nvmrc | 2 +- plugins/css-has-pseudo/.nvmrc | 2 +- plugins/css-prefers-color-scheme/.nvmrc | 2 +- plugins/postcss-alpha-function/.nvmrc | 2 +- plugins/postcss-attribute-case-insensitive/.nvmrc | 2 +- plugins/postcss-base-plugin/.nvmrc | 2 +- plugins/postcss-browser-comments/.nvmrc | 2 +- plugins/postcss-cascade-layers/.nvmrc | 2 +- plugins/postcss-color-function-display-p3-linear/.nvmrc | 2 +- plugins/postcss-color-function/.nvmrc | 2 +- plugins/postcss-color-functional-notation/.nvmrc | 2 +- plugins/postcss-color-hex-alpha/.nvmrc | 2 +- plugins/postcss-color-mix-function/.nvmrc | 2 +- plugins/postcss-color-rebeccapurple/.nvmrc | 2 +- plugins/postcss-conditional-values/.nvmrc | 2 +- plugins/postcss-container-rule-prelude-list/.nvmrc | 2 +- plugins/postcss-content-alt-text/.nvmrc | 2 +- plugins/postcss-contrast-color-function/.nvmrc | 2 +- plugins/postcss-custom-media/.nvmrc | 2 +- plugins/postcss-custom-properties/.nvmrc | 2 +- plugins/postcss-custom-selectors/.nvmrc | 2 +- plugins/postcss-debug-logger/.nvmrc | 2 +- plugins/postcss-design-tokens/.nvmrc | 2 +- plugins/postcss-dir-pseudo-class/.nvmrc | 2 +- plugins/postcss-double-position-gradients/.nvmrc | 2 +- plugins/postcss-env-function/.nvmrc | 2 +- plugins/postcss-exponential-functions/.nvmrc | 2 +- plugins/postcss-extract/.nvmrc | 2 +- plugins/postcss-focus-visible/.nvmrc | 2 +- plugins/postcss-focus-within/.nvmrc | 2 +- plugins/postcss-font-format-keywords/.nvmrc | 2 +- plugins/postcss-font-width-property/.nvmrc | 2 +- plugins/postcss-gamut-mapping/.nvmrc | 2 +- plugins/postcss-gap-properties/.nvmrc | 2 +- plugins/postcss-global-data/.nvmrc | 2 +- plugins/postcss-gradients-interpolation-method/.nvmrc | 2 +- plugins/postcss-hwb-function/.nvmrc | 2 +- plugins/postcss-ic-unit/.nvmrc | 2 +- plugins/postcss-image-function/.nvmrc | 2 +- plugins/postcss-image-set-function/.nvmrc | 2 +- plugins/postcss-initial/.nvmrc | 2 +- plugins/postcss-is-pseudo-class/.nvmrc | 2 +- plugins/postcss-lab-function/.nvmrc | 2 +- plugins/postcss-light-dark-function/.nvmrc | 2 +- plugins/postcss-logical-float-and-clear/.nvmrc | 2 +- plugins/postcss-logical-overflow/.nvmrc | 2 +- plugins/postcss-logical-overscroll-behavior/.nvmrc | 2 +- plugins/postcss-logical-resize/.nvmrc | 2 +- plugins/postcss-logical-viewport-units/.nvmrc | 2 +- plugins/postcss-logical/.nvmrc | 2 +- plugins/postcss-media-minmax/.nvmrc | 2 +- .../.nvmrc | 2 +- plugins/postcss-minify/.nvmrc | 2 +- plugins/postcss-mixins/.nvmrc | 2 +- plugins/postcss-nested-calc/.nvmrc | 2 +- plugins/postcss-nesting/.nvmrc | 2 +- plugins/postcss-normalize-display-values/.nvmrc | 2 +- plugins/postcss-oklab-function/.nvmrc | 2 +- plugins/postcss-overflow-shorthand/.nvmrc | 2 +- plugins/postcss-place/.nvmrc | 2 +- plugins/postcss-position-area-property/.nvmrc | 2 +- plugins/postcss-progressive-custom-properties/.nvmrc | 2 +- plugins/postcss-property-rule-prelude-list/.nvmrc | 2 +- plugins/postcss-pseudo-class-any-link/.nvmrc | 2 +- plugins/postcss-random-function/.nvmrc | 2 +- plugins/postcss-rebase-url/.nvmrc | 2 +- plugins/postcss-rewrite-url/.nvmrc | 2 +- plugins/postcss-scope-pseudo-class/.nvmrc | 2 +- plugins/postcss-selector-not/.nvmrc | 2 +- plugins/postcss-sign-functions/.nvmrc | 2 +- plugins/postcss-slow-plugins/.nvmrc | 2 +- plugins/postcss-stepped-value-functions/.nvmrc | 2 +- .../postcss-syntax-descriptor-syntax-production/.nvmrc | 2 +- plugins/postcss-system-ui-font-family/.nvmrc | 2 +- plugins/postcss-text-decoration-shorthand/.nvmrc | 2 +- plugins/postcss-todo-or-die/.nvmrc | 2 +- plugins/postcss-trigonometric-functions/.nvmrc | 2 +- plugins/postcss-unset-value/.nvmrc | 2 +- sites/postcss-preset-env/.nvmrc | 2 +- 112 files changed, 115 insertions(+), 115 deletions(-) diff --git a/.github/workflows/deploy-preset-env.yml b/.github/workflows/deploy-preset-env.yml index 1ef7d35558..7e48979ae9 100644 --- a/.github/workflows/deploy-preset-env.yml +++ b/.github/workflows/deploy-preset-env.yml @@ -25,7 +25,7 @@ jobs: fetch-depth: 1 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e with: - node-version: 24 + node-version: 26 - name: npm ci run: | diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2a1303806c..e633af24cc 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -22,7 +22,7 @@ jobs: fetch-depth: 1 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e with: - node-version: 24 + node-version: 26 - name: npm ci run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3dcd4ad3ba..a12fa72146 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,15 +23,15 @@ jobs: # Enable annotations only for node 24 + ubuntu matrix: os: [ubuntu-latest] - node: [20, 22, 24, 25] + node: [20, 22, 24, 25, 26] include: - os: macos-latest - node: 24 + node: 26 - os: windows-latest - node: 24 + node: 26 - os: ubuntu-latest is_base_os_version: true - - node: 24 + - node: 26 is_base_node_version: true steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd diff --git a/.nvmrc b/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/cli/csstools-cli/.nvmrc b/cli/csstools-cli/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/cli/csstools-cli/.nvmrc +++ b/cli/csstools-cli/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/e2e-package-managers/yarn/.nvmrc b/e2e-package-managers/yarn/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/e2e-package-managers/yarn/.nvmrc +++ b/e2e-package-managers/yarn/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/e2e/.nvmrc b/e2e/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/e2e/.nvmrc +++ b/e2e/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/e2e/browserslist/package-json/.nvmrc b/e2e/browserslist/package-json/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/e2e/browserslist/package-json/.nvmrc +++ b/e2e/browserslist/package-json/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/e2e/interop/custom-media--design-tokens--global-data/.nvmrc b/e2e/interop/custom-media--design-tokens--global-data/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/e2e/interop/custom-media--design-tokens--global-data/.nvmrc +++ b/e2e/interop/custom-media--design-tokens--global-data/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/e2e/postcss-cli/commonjs/.nvmrc b/e2e/postcss-cli/commonjs/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/e2e/postcss-cli/commonjs/.nvmrc +++ b/e2e/postcss-cli/commonjs/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/e2e/postcss-cli/esm/.nvmrc b/e2e/postcss-cli/esm/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/e2e/postcss-cli/esm/.nvmrc +++ b/e2e/postcss-cli/esm/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/e2e/typescript/commonjs/.nvmrc b/e2e/typescript/commonjs/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/e2e/typescript/commonjs/.nvmrc +++ b/e2e/typescript/commonjs/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/e2e/typescript/esm/.nvmrc b/e2e/typescript/esm/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/e2e/typescript/esm/.nvmrc +++ b/e2e/typescript/esm/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/e2e/webpack/bundle-through/.nvmrc b/e2e/webpack/bundle-through/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/e2e/webpack/bundle-through/.nvmrc +++ b/e2e/webpack/bundle-through/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/e2e/webpack/postcss-loader/.nvmrc b/e2e/webpack/postcss-loader/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/e2e/webpack/postcss-loader/.nvmrc +++ b/e2e/webpack/postcss-loader/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/experimental/css-has-pseudo/.nvmrc b/experimental/css-has-pseudo/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/experimental/css-has-pseudo/.nvmrc +++ b/experimental/css-has-pseudo/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/experimental/postcss-gradient-stop-increments/.nvmrc b/experimental/postcss-gradient-stop-increments/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/experimental/postcss-gradient-stop-increments/.nvmrc +++ b/experimental/postcss-gradient-stop-increments/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/experimental/postcss-nesting/.nvmrc b/experimental/postcss-nesting/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/experimental/postcss-nesting/.nvmrc +++ b/experimental/postcss-nesting/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/package.json b/package.json index 2ec85fda2c..67d6630c95 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,6 @@ "knip": "knip" }, "volta": { - "node": "25.9.0" + "node": "26.1.0" } } diff --git a/packages/base-cli/.nvmrc b/packages/base-cli/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/packages/base-cli/.nvmrc +++ b/packages/base-cli/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/packages/cascade-layer-name-parser/.nvmrc b/packages/cascade-layer-name-parser/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/packages/cascade-layer-name-parser/.nvmrc +++ b/packages/cascade-layer-name-parser/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/packages/color-helpers/.nvmrc b/packages/color-helpers/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/packages/color-helpers/.nvmrc +++ b/packages/color-helpers/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/packages/css-calc/.nvmrc b/packages/css-calc/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/packages/css-calc/.nvmrc +++ b/packages/css-calc/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/packages/css-color-parser/.nvmrc b/packages/css-color-parser/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/packages/css-color-parser/.nvmrc +++ b/packages/css-color-parser/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/packages/css-parser-algorithms/.nvmrc b/packages/css-parser-algorithms/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/packages/css-parser-algorithms/.nvmrc +++ b/packages/css-parser-algorithms/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/packages/css-tokenizer/.nvmrc b/packages/css-tokenizer/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/packages/css-tokenizer/.nvmrc +++ b/packages/css-tokenizer/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/packages/generate-test-cases/.nvmrc b/packages/generate-test-cases/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/packages/generate-test-cases/.nvmrc +++ b/packages/generate-test-cases/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/packages/media-query-list-parser/.nvmrc b/packages/media-query-list-parser/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/packages/media-query-list-parser/.nvmrc +++ b/packages/media-query-list-parser/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/packages/selector-resolve-nested/.nvmrc b/packages/selector-resolve-nested/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/packages/selector-resolve-nested/.nvmrc +++ b/packages/selector-resolve-nested/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/packages/selector-specificity/.nvmrc b/packages/selector-specificity/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/packages/selector-specificity/.nvmrc +++ b/packages/selector-specificity/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/packages/utilities/.nvmrc b/packages/utilities/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/packages/utilities/.nvmrc +++ b/packages/utilities/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugin-packs/postcss-bundler/.nvmrc b/plugin-packs/postcss-bundler/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugin-packs/postcss-bundler/.nvmrc +++ b/plugin-packs/postcss-bundler/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugin-packs/postcss-preset-env/.nvmrc b/plugin-packs/postcss-preset-env/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugin-packs/postcss-preset-env/.nvmrc +++ b/plugin-packs/postcss-preset-env/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/css-blank-pseudo/.nvmrc b/plugins/css-blank-pseudo/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/css-blank-pseudo/.nvmrc +++ b/plugins/css-blank-pseudo/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/css-has-pseudo/.nvmrc b/plugins/css-has-pseudo/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/css-has-pseudo/.nvmrc +++ b/plugins/css-has-pseudo/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/css-prefers-color-scheme/.nvmrc b/plugins/css-prefers-color-scheme/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/css-prefers-color-scheme/.nvmrc +++ b/plugins/css-prefers-color-scheme/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-alpha-function/.nvmrc b/plugins/postcss-alpha-function/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-alpha-function/.nvmrc +++ b/plugins/postcss-alpha-function/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-attribute-case-insensitive/.nvmrc b/plugins/postcss-attribute-case-insensitive/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-attribute-case-insensitive/.nvmrc +++ b/plugins/postcss-attribute-case-insensitive/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-base-plugin/.nvmrc b/plugins/postcss-base-plugin/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-base-plugin/.nvmrc +++ b/plugins/postcss-base-plugin/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-browser-comments/.nvmrc b/plugins/postcss-browser-comments/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-browser-comments/.nvmrc +++ b/plugins/postcss-browser-comments/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-cascade-layers/.nvmrc b/plugins/postcss-cascade-layers/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-cascade-layers/.nvmrc +++ b/plugins/postcss-cascade-layers/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-color-function-display-p3-linear/.nvmrc b/plugins/postcss-color-function-display-p3-linear/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-color-function-display-p3-linear/.nvmrc +++ b/plugins/postcss-color-function-display-p3-linear/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-color-function/.nvmrc b/plugins/postcss-color-function/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-color-function/.nvmrc +++ b/plugins/postcss-color-function/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-color-functional-notation/.nvmrc b/plugins/postcss-color-functional-notation/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-color-functional-notation/.nvmrc +++ b/plugins/postcss-color-functional-notation/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-color-hex-alpha/.nvmrc b/plugins/postcss-color-hex-alpha/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-color-hex-alpha/.nvmrc +++ b/plugins/postcss-color-hex-alpha/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-color-mix-function/.nvmrc b/plugins/postcss-color-mix-function/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-color-mix-function/.nvmrc +++ b/plugins/postcss-color-mix-function/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-color-rebeccapurple/.nvmrc b/plugins/postcss-color-rebeccapurple/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-color-rebeccapurple/.nvmrc +++ b/plugins/postcss-color-rebeccapurple/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-conditional-values/.nvmrc b/plugins/postcss-conditional-values/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-conditional-values/.nvmrc +++ b/plugins/postcss-conditional-values/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-container-rule-prelude-list/.nvmrc b/plugins/postcss-container-rule-prelude-list/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-container-rule-prelude-list/.nvmrc +++ b/plugins/postcss-container-rule-prelude-list/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-content-alt-text/.nvmrc b/plugins/postcss-content-alt-text/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-content-alt-text/.nvmrc +++ b/plugins/postcss-content-alt-text/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-contrast-color-function/.nvmrc b/plugins/postcss-contrast-color-function/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-contrast-color-function/.nvmrc +++ b/plugins/postcss-contrast-color-function/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-custom-media/.nvmrc b/plugins/postcss-custom-media/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-custom-media/.nvmrc +++ b/plugins/postcss-custom-media/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-custom-properties/.nvmrc b/plugins/postcss-custom-properties/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-custom-properties/.nvmrc +++ b/plugins/postcss-custom-properties/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-custom-selectors/.nvmrc b/plugins/postcss-custom-selectors/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-custom-selectors/.nvmrc +++ b/plugins/postcss-custom-selectors/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-debug-logger/.nvmrc b/plugins/postcss-debug-logger/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-debug-logger/.nvmrc +++ b/plugins/postcss-debug-logger/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-design-tokens/.nvmrc b/plugins/postcss-design-tokens/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-design-tokens/.nvmrc +++ b/plugins/postcss-design-tokens/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-dir-pseudo-class/.nvmrc b/plugins/postcss-dir-pseudo-class/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-dir-pseudo-class/.nvmrc +++ b/plugins/postcss-dir-pseudo-class/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-double-position-gradients/.nvmrc b/plugins/postcss-double-position-gradients/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-double-position-gradients/.nvmrc +++ b/plugins/postcss-double-position-gradients/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-env-function/.nvmrc b/plugins/postcss-env-function/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-env-function/.nvmrc +++ b/plugins/postcss-env-function/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-exponential-functions/.nvmrc b/plugins/postcss-exponential-functions/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-exponential-functions/.nvmrc +++ b/plugins/postcss-exponential-functions/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-extract/.nvmrc b/plugins/postcss-extract/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-extract/.nvmrc +++ b/plugins/postcss-extract/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-focus-visible/.nvmrc b/plugins/postcss-focus-visible/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-focus-visible/.nvmrc +++ b/plugins/postcss-focus-visible/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-focus-within/.nvmrc b/plugins/postcss-focus-within/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-focus-within/.nvmrc +++ b/plugins/postcss-focus-within/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-font-format-keywords/.nvmrc b/plugins/postcss-font-format-keywords/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-font-format-keywords/.nvmrc +++ b/plugins/postcss-font-format-keywords/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-font-width-property/.nvmrc b/plugins/postcss-font-width-property/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-font-width-property/.nvmrc +++ b/plugins/postcss-font-width-property/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-gamut-mapping/.nvmrc b/plugins/postcss-gamut-mapping/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-gamut-mapping/.nvmrc +++ b/plugins/postcss-gamut-mapping/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-gap-properties/.nvmrc b/plugins/postcss-gap-properties/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-gap-properties/.nvmrc +++ b/plugins/postcss-gap-properties/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-global-data/.nvmrc b/plugins/postcss-global-data/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-global-data/.nvmrc +++ b/plugins/postcss-global-data/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-gradients-interpolation-method/.nvmrc b/plugins/postcss-gradients-interpolation-method/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-gradients-interpolation-method/.nvmrc +++ b/plugins/postcss-gradients-interpolation-method/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-hwb-function/.nvmrc b/plugins/postcss-hwb-function/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-hwb-function/.nvmrc +++ b/plugins/postcss-hwb-function/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-ic-unit/.nvmrc b/plugins/postcss-ic-unit/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-ic-unit/.nvmrc +++ b/plugins/postcss-ic-unit/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-image-function/.nvmrc b/plugins/postcss-image-function/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-image-function/.nvmrc +++ b/plugins/postcss-image-function/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-image-set-function/.nvmrc b/plugins/postcss-image-set-function/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-image-set-function/.nvmrc +++ b/plugins/postcss-image-set-function/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-initial/.nvmrc b/plugins/postcss-initial/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-initial/.nvmrc +++ b/plugins/postcss-initial/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-is-pseudo-class/.nvmrc b/plugins/postcss-is-pseudo-class/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-is-pseudo-class/.nvmrc +++ b/plugins/postcss-is-pseudo-class/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-lab-function/.nvmrc b/plugins/postcss-lab-function/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-lab-function/.nvmrc +++ b/plugins/postcss-lab-function/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-light-dark-function/.nvmrc b/plugins/postcss-light-dark-function/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-light-dark-function/.nvmrc +++ b/plugins/postcss-light-dark-function/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-logical-float-and-clear/.nvmrc b/plugins/postcss-logical-float-and-clear/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-logical-float-and-clear/.nvmrc +++ b/plugins/postcss-logical-float-and-clear/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-logical-overflow/.nvmrc b/plugins/postcss-logical-overflow/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-logical-overflow/.nvmrc +++ b/plugins/postcss-logical-overflow/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-logical-overscroll-behavior/.nvmrc b/plugins/postcss-logical-overscroll-behavior/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-logical-overscroll-behavior/.nvmrc +++ b/plugins/postcss-logical-overscroll-behavior/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-logical-resize/.nvmrc b/plugins/postcss-logical-resize/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-logical-resize/.nvmrc +++ b/plugins/postcss-logical-resize/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-logical-viewport-units/.nvmrc b/plugins/postcss-logical-viewport-units/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-logical-viewport-units/.nvmrc +++ b/plugins/postcss-logical-viewport-units/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-logical/.nvmrc b/plugins/postcss-logical/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-logical/.nvmrc +++ b/plugins/postcss-logical/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-media-minmax/.nvmrc b/plugins/postcss-media-minmax/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-media-minmax/.nvmrc +++ b/plugins/postcss-media-minmax/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-media-queries-aspect-ratio-number-values/.nvmrc b/plugins/postcss-media-queries-aspect-ratio-number-values/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-media-queries-aspect-ratio-number-values/.nvmrc +++ b/plugins/postcss-media-queries-aspect-ratio-number-values/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-minify/.nvmrc b/plugins/postcss-minify/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-minify/.nvmrc +++ b/plugins/postcss-minify/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-mixins/.nvmrc b/plugins/postcss-mixins/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-mixins/.nvmrc +++ b/plugins/postcss-mixins/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-nested-calc/.nvmrc b/plugins/postcss-nested-calc/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-nested-calc/.nvmrc +++ b/plugins/postcss-nested-calc/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-nesting/.nvmrc b/plugins/postcss-nesting/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-nesting/.nvmrc +++ b/plugins/postcss-nesting/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-normalize-display-values/.nvmrc b/plugins/postcss-normalize-display-values/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-normalize-display-values/.nvmrc +++ b/plugins/postcss-normalize-display-values/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-oklab-function/.nvmrc b/plugins/postcss-oklab-function/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-oklab-function/.nvmrc +++ b/plugins/postcss-oklab-function/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-overflow-shorthand/.nvmrc b/plugins/postcss-overflow-shorthand/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-overflow-shorthand/.nvmrc +++ b/plugins/postcss-overflow-shorthand/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-place/.nvmrc b/plugins/postcss-place/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-place/.nvmrc +++ b/plugins/postcss-place/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-position-area-property/.nvmrc b/plugins/postcss-position-area-property/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-position-area-property/.nvmrc +++ b/plugins/postcss-position-area-property/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-progressive-custom-properties/.nvmrc b/plugins/postcss-progressive-custom-properties/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-progressive-custom-properties/.nvmrc +++ b/plugins/postcss-progressive-custom-properties/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-property-rule-prelude-list/.nvmrc b/plugins/postcss-property-rule-prelude-list/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-property-rule-prelude-list/.nvmrc +++ b/plugins/postcss-property-rule-prelude-list/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-pseudo-class-any-link/.nvmrc b/plugins/postcss-pseudo-class-any-link/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-pseudo-class-any-link/.nvmrc +++ b/plugins/postcss-pseudo-class-any-link/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-random-function/.nvmrc b/plugins/postcss-random-function/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-random-function/.nvmrc +++ b/plugins/postcss-random-function/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-rebase-url/.nvmrc b/plugins/postcss-rebase-url/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-rebase-url/.nvmrc +++ b/plugins/postcss-rebase-url/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-rewrite-url/.nvmrc b/plugins/postcss-rewrite-url/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-rewrite-url/.nvmrc +++ b/plugins/postcss-rewrite-url/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-scope-pseudo-class/.nvmrc b/plugins/postcss-scope-pseudo-class/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-scope-pseudo-class/.nvmrc +++ b/plugins/postcss-scope-pseudo-class/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-selector-not/.nvmrc b/plugins/postcss-selector-not/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-selector-not/.nvmrc +++ b/plugins/postcss-selector-not/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-sign-functions/.nvmrc b/plugins/postcss-sign-functions/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-sign-functions/.nvmrc +++ b/plugins/postcss-sign-functions/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-slow-plugins/.nvmrc b/plugins/postcss-slow-plugins/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-slow-plugins/.nvmrc +++ b/plugins/postcss-slow-plugins/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-stepped-value-functions/.nvmrc b/plugins/postcss-stepped-value-functions/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-stepped-value-functions/.nvmrc +++ b/plugins/postcss-stepped-value-functions/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-syntax-descriptor-syntax-production/.nvmrc b/plugins/postcss-syntax-descriptor-syntax-production/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-syntax-descriptor-syntax-production/.nvmrc +++ b/plugins/postcss-syntax-descriptor-syntax-production/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-system-ui-font-family/.nvmrc b/plugins/postcss-system-ui-font-family/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-system-ui-font-family/.nvmrc +++ b/plugins/postcss-system-ui-font-family/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-text-decoration-shorthand/.nvmrc b/plugins/postcss-text-decoration-shorthand/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-text-decoration-shorthand/.nvmrc +++ b/plugins/postcss-text-decoration-shorthand/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-todo-or-die/.nvmrc b/plugins/postcss-todo-or-die/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-todo-or-die/.nvmrc +++ b/plugins/postcss-todo-or-die/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-trigonometric-functions/.nvmrc b/plugins/postcss-trigonometric-functions/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-trigonometric-functions/.nvmrc +++ b/plugins/postcss-trigonometric-functions/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/plugins/postcss-unset-value/.nvmrc b/plugins/postcss-unset-value/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/plugins/postcss-unset-value/.nvmrc +++ b/plugins/postcss-unset-value/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 diff --git a/sites/postcss-preset-env/.nvmrc b/sites/postcss-preset-env/.nvmrc index 28d6ff1c82..b807a943cb 100644 --- a/sites/postcss-preset-env/.nvmrc +++ b/sites/postcss-preset-env/.nvmrc @@ -1 +1 @@ -v25.1.0 +v26.1.0 From 5f3f47bfa524aabf2a4c780aba5c8d37931f61c8 Mon Sep 17 00:00:00 2001 From: Romain Menke Date: Wed, 13 May 2026 15:06:04 +0200 Subject: [PATCH 3/8] ES2025 --- tsconfig.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 9bcabc437e..8795059d53 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,8 +2,8 @@ "compilerOptions": { "moduleResolution": "bundler", "allowJs": false, - "target": "ES2024", - "lib": ["ES2024"], + "target": "ES2025", + "lib": ["ES2025"], "module": "ESNext", "declaration": true, "isolatedModules": true, From b9bd2d6ac7b90dec9c954653e4837fd2d4a6acc9 Mon Sep 17 00:00:00 2001 From: Romain Menke Date: Wed, 13 May 2026 15:15:23 +0200 Subject: [PATCH 4/8] fix --- tsconfig.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 8795059d53..3673885e24 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,8 +2,8 @@ "compilerOptions": { "moduleResolution": "bundler", "allowJs": false, - "target": "ES2025", - "lib": ["ES2025"], + "target": "esnext", + "lib": ["esnext"], "module": "ESNext", "declaration": true, "isolatedModules": true, From 95e1d1f8a25569726dce2e564b009535e2a66746 Mon Sep 17 00:00:00 2001 From: Romain Menke Date: Wed, 13 May 2026 15:35:57 +0200 Subject: [PATCH 5/8] fix --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a12fa72146..01f7ca636a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -78,6 +78,9 @@ jobs: - name: Disable AppArmor run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns if: matrix.is_base_node_version && matrix.is_base_os_version + - name: Puppeteer Install Chrome + run: npx puppeteer browsers install chrome + if: matrix.is_base_node_version && matrix.is_base_os_version # Basic tests - name: test From 6aab865a82c89382ab95a4e535ecef85dfb75016 Mon Sep 17 00:00:00 2001 From: Romain Menke Date: Wed, 13 May 2026 15:42:17 +0200 Subject: [PATCH 6/8] fix --- package-lock.json | 11 +++++++++++ package.json | 1 + 2 files changed, 12 insertions(+) diff --git a/package-lock.json b/package-lock.json index e94675ee22..8f5d7bf246 100644 --- a/package-lock.json +++ b/package-lock.json @@ -41,6 +41,7 @@ "eslint": "^10.2.1", "globals": "^17.6.0", "knip": "^6.11.0", + "puppeteer": "^24.41.0", "rollup": "^4.60.2", "tslib": "^2.8.0", "typescript": "^6.0.3", @@ -11029,6 +11030,10 @@ } ], "license": "MIT-0", + "dependencies": { + "@csstools/css-parser-algorithms": "^4.0.0", + "@csstools/css-tokenizer": "^4.0.0" + }, "devDependencies": { "@csstools/postcss-tape": "*" }, @@ -11673,6 +11678,12 @@ } ], "license": "MIT-0", + "dependencies": { + "@csstools/css-parser-algorithms": "^4.0.0", + "@csstools/css-tokenizer": "^4.0.0", + "@csstools/postcss-progressive-custom-properties": "^5.0.0", + "@csstools/utilities": "^3.0.0" + }, "devDependencies": { "@csstools/postcss-tape": "*" }, diff --git a/package.json b/package.json index 67d6630c95..d625065cf5 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "eslint": "^10.2.1", "globals": "^17.6.0", "knip": "^6.11.0", + "puppeteer": "^24.41.0", "rollup": "^4.60.2", "tslib": "^2.8.0", "typescript": "^6.0.3", From f378e4e8260dbc75e0aa5a747ce3ab71f70a43b5 Mon Sep 17 00:00:00 2001 From: Romain Menke Date: Wed, 13 May 2026 15:57:02 +0200 Subject: [PATCH 7/8] fix --- .github/workflows/test.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 01f7ca636a..5aee8bb193 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,12 +26,12 @@ jobs: node: [20, 22, 24, 25, 26] include: - os: macos-latest - node: 26 + node: 24 - os: windows-latest - node: 26 + node: 24 - os: ubuntu-latest is_base_os_version: true - - node: 26 + - node: 24 is_base_node_version: true steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd @@ -78,9 +78,6 @@ jobs: - name: Disable AppArmor run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns if: matrix.is_base_node_version && matrix.is_base_os_version - - name: Puppeteer Install Chrome - run: npx puppeteer browsers install chrome - if: matrix.is_base_node_version && matrix.is_base_os_version # Basic tests - name: test From 0664dcdac908b3fa6825e470a882fd683b0a8977 Mon Sep 17 00:00:00 2001 From: Romain Menke Date: Wed, 13 May 2026 16:07:02 +0200 Subject: [PATCH 8/8] fix --- package-lock.json | 1 - package.json | 1 - 2 files changed, 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8f5d7bf246..55eec5df93 100644 --- a/package-lock.json +++ b/package-lock.json @@ -41,7 +41,6 @@ "eslint": "^10.2.1", "globals": "^17.6.0", "knip": "^6.11.0", - "puppeteer": "^24.41.0", "rollup": "^4.60.2", "tslib": "^2.8.0", "typescript": "^6.0.3", diff --git a/package.json b/package.json index d625065cf5..67d6630c95 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,6 @@ "eslint": "^10.2.1", "globals": "^17.6.0", "knip": "^6.11.0", - "puppeteer": "^24.41.0", "rollup": "^4.60.2", "tslib": "^2.8.0", "typescript": "^6.0.3",