From fc87c009806dcc98867f6b58efe29b042aa01dee Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 18 May 2026 23:10:59 +0800 Subject: node: update --- .../postcss-ordered-values/src/rules/columns.js | 39 ---------------------- 1 file changed, 39 deletions(-) delete mode 100644 node_modules/postcss-ordered-values/src/rules/columns.js (limited to 'node_modules/postcss-ordered-values/src/rules/columns.js') diff --git a/node_modules/postcss-ordered-values/src/rules/columns.js b/node_modules/postcss-ordered-values/src/rules/columns.js deleted file mode 100644 index 10a00a9e..00000000 --- a/node_modules/postcss-ordered-values/src/rules/columns.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; -const { unit } = require('postcss-value-parser'); - -/** - * @param {string} value - * @return {boolean} - */ -function hasUnit(value) { - const parsedVal = unit(value); - return parsedVal && parsedVal.unit !== ''; -} - -/** - * @param {import('postcss-value-parser').ParsedValue} columns - * @return {import('postcss-value-parser').ParsedValue | string} - */ -module.exports = (columns) => { - /** @type {string[]} */ - const widths = []; - /** @type {string[]} */ - const other = []; - columns.walk((node) => { - const { type, value } = node; - if (type === 'word') { - if (hasUnit(value)) { - widths.push(value); - } else { - other.push(value); - } - } - }); - - // only transform if declaration is not invalid or a single value - if (other.length === 1 && widths.length === 1) { - return `${widths[0].trimStart()} ${other[0].trimStart()}`; - } - - return columns; -}; -- cgit v1.2.3