diff options
Diffstat (limited to 'node_modules/postcss-color-functional-notation')
7 files changed, 0 insertions, 281 deletions
diff --git a/node_modules/postcss-color-functional-notation/CHANGELOG.md b/node_modules/postcss-color-functional-notation/CHANGELOG.md deleted file mode 100644 index aebea46a..00000000 --- a/node_modules/postcss-color-functional-notation/CHANGELOG.md +++ /dev/null @@ -1,25 +0,0 @@ -# Changes to PostCSS Color Functional Notation - -### 6.0.14 - -_July 7, 2024_ - -- Updated [`@csstools/postcss-progressive-custom-properties`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties) to [`3.3.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties/CHANGELOG.md#330) (minor) - -### 6.0.13 - -_July 6, 2024_ - -- Updated [`@csstools/css-tokenizer`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer) to [`2.4.1`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer/CHANGELOG.md#241) (patch) -- Updated [`@csstools/css-parser-algorithms`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms) to [`2.7.1`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms/CHANGELOG.md#271) (patch) -- Updated [`@csstools/css-color-parser`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-color-parser) to [`2.0.4`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-color-parser/CHANGELOG.md#204) (patch) - -### 6.0.12 - -_June 29, 2024_ - -- Updated [`@csstools/css-tokenizer`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer) to [`2.3.2`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer/CHANGELOG.md#232) (patch) -- Updated [`@csstools/css-parser-algorithms`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms) to [`2.7.0`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms/CHANGELOG.md#270) (minor) -- Updated [`@csstools/css-color-parser`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-color-parser) to [`2.0.3`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-color-parser/CHANGELOG.md#203) (patch) - -[Full CHANGELOG](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-functional-notation/CHANGELOG.md) diff --git a/node_modules/postcss-color-functional-notation/LICENSE.md b/node_modules/postcss-color-functional-notation/LICENSE.md deleted file mode 100644 index e8ae93b9..00000000 --- a/node_modules/postcss-color-functional-notation/LICENSE.md +++ /dev/null @@ -1,18 +0,0 @@ -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/node_modules/postcss-color-functional-notation/README.md b/node_modules/postcss-color-functional-notation/README.md deleted file mode 100644 index 6acc35c3..00000000 --- a/node_modules/postcss-color-functional-notation/README.md +++ /dev/null @@ -1,147 +0,0 @@ -# PostCSS Color Functional Notation [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">][PostCSS] - -[<img alt="npm version" src="https://img.shields.io/npm/v/postcss-color-functional-notation.svg" height="20">][npm-url] [<img alt="Build Status" src="https://github.com/csstools/postcss-plugins/workflows/test/badge.svg" height="20">][cli-url] [<img alt="Discord" src="https://shields.io/badge/Discord-5865F2?logo=discord&logoColor=white">][discord]<br><br>[<img alt="Baseline Status" src="https://cssdb.org/images/badges-baseline/color-functional-notation.svg" height="20">][css-url] [<img alt="CSS Standard Status" src="https://cssdb.org/images/badges/color-functional-notation.svg" height="20">][css-url] - -```bash -npm install postcss-color-functional-notation --save-dev -``` - -[PostCSS Color Functional Notation] lets you use space and slash separated -color notation in CSS, following the [CSS Color] specification. - -```pcss -:root { - --firebrick: rgb(178 34 34); - --firebrick-a50: rgb(70% 13.5% 13.5% / 50%); - --firebrick-hsl: hsla(0 68% 42%); - --firebrick-hsl-a50: hsl(0 68% 42% / 50%); -} - -/* becomes */ - -:root { - --firebrick: rgb(178, 34, 34); - --firebrick-a50: rgba(179, 34, 34, 0.5); - --firebrick-hsl: hsl(0, 68%, 42%); - --firebrick-hsl-a50: hsla(0, 68%, 42%, 0.5); -} -``` - -## Usage - -Add [PostCSS Color Functional Notation] to your project: - -```bash -npm install postcss postcss-color-functional-notation --save-dev -``` - -Use it as a [PostCSS] plugin: - -```js -const postcss = require('postcss'); -const postcssColorFunctionalNotation = require('postcss-color-functional-notation'); - -postcss([ - postcssColorFunctionalNotation(/* pluginOptions */) -]).process(YOUR_CSS /*, processOptions */); -``` - -[PostCSS Color Functional Notation] 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 -postcssColorFunctionalNotation({ preserve: true }) -``` - -```pcss -:root { - --firebrick: rgb(178 34 34); - --firebrick-a50: rgb(70% 13.5% 13.5% / 50%); - --firebrick-hsl: hsla(0 68% 42%); - --firebrick-hsl-a50: hsl(0 68% 42% / 50%); -} - -/* becomes */ - -:root { - --firebrick: rgb(178, 34, 34); - --firebrick-a50: rgba(179, 34, 34, 0.5); - --firebrick-hsl: hsl(0, 68%, 42%); - --firebrick-hsl: hsla(0 68% 42%); - --firebrick-hsl-a50: hsla(0, 68%, 42%, 0.5); -} - -@supports (color: rgb(0 0 0 / 0)) { -:root { - --firebrick: rgb(178 34 34); - --firebrick-a50: rgb(70% 13.5% 13.5% / 50%); -} -} - -@supports (color: hsl(0 0% 0% / 0)) { -:root { - --firebrick-hsl-a50: hsl(0 68% 42% / 50%); -} -} -``` - -### enableProgressiveCustomProperties - -The `enableProgressiveCustomProperties` option determines whether the original notation -is wrapped with `@supports` when used in Custom Properties. By default, it is enabled. - -> [!NOTE] -> We only recommend disabling this when you set `preserve` to `false` or if you bring your own fix for Custom Properties. -> See what the plugin does in its [README](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties#readme). - -```js -postcssColorFunctionalNotation({ enableProgressiveCustomProperties: false }) -``` - -```pcss -:root { - --firebrick: rgb(178 34 34); - --firebrick-a50: rgb(70% 13.5% 13.5% / 50%); - --firebrick-hsl: hsla(0 68% 42%); - --firebrick-hsl-a50: hsl(0 68% 42% / 50%); -} - -/* becomes */ - -:root { - --firebrick: rgb(178, 34, 34); - --firebrick: rgb(178 34 34); - --firebrick-a50: rgba(179, 34, 34, 0.5); - --firebrick-a50: rgb(70% 13.5% 13.5% / 50%); - --firebrick-hsl: hsl(0, 68%, 42%); - --firebrick-hsl: hsla(0 68% 42%); - --firebrick-hsl-a50: hsla(0, 68%, 42%, 0.5); - --firebrick-hsl-a50: hsl(0 68% 42% / 50%); -} -``` - -_Custom properties do not fallback to the previous declaration_ - -[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test -[css-url]: https://cssdb.org/#color-functional-notation -[discord]: https://discord.gg/bUadyRwkJS -[npm-url]: https://www.npmjs.com/package/postcss-color-functional-notation - -[PostCSS]: https://github.com/postcss/postcss -[PostCSS Color Functional Notation]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-functional-notation -[CSS Color]: https://www.w3.org/TR/css-color-4/#funcdef-rgb diff --git a/node_modules/postcss-color-functional-notation/dist/index.cjs b/node_modules/postcss-color-functional-notation/dist/index.cjs deleted file mode 100644 index 08ba436e..00000000 --- a/node_modules/postcss-color-functional-notation/dist/index.cjs +++ /dev/null @@ -1 +0,0 @@ -"use strict";var s=require("@csstools/postcss-progressive-custom-properties"),e=require("@csstools/css-color-parser"),t=require("@csstools/utilities"),o=require("@csstools/css-parser-algorithms"),a=require("@csstools/css-tokenizer");const r=/^(?:rgb|hsl)a?$/i,n=/\b(?:rgb|hsl)a?\(/i,basePlugin=s=>({postcssPlugin:"postcss-color-functional-notation",Declaration(l){const i=l.value;if(!n.test(i))return;if(t.hasFallback(l))return;if(t.hasSupportsAtRuleAncestor(l,n))return;const c=o.replaceComponentValues(o.parseCommaSeparatedListOfComponentValues(a.tokenize({css:i})),(s=>{if(!o.isFunctionNode(s)||!r.test(s.getName()))return;const t=e.color(s);return!t||t.syntaxFlags.has(e.SyntaxFlag.Experimental)||t.syntaxFlags.has(e.SyntaxFlag.HasNoneKeywords)||t.syntaxFlags.has(e.SyntaxFlag.RelativeColorSyntax)||(t.syntaxFlags.has(e.SyntaxFlag.LegacyRGB)||t.syntaxFlags.has(e.SyntaxFlag.LegacyHSL))&&!t.syntaxFlags.has(e.SyntaxFlag.HasPercentageAlpha)?void 0:t.colorNotation===e.ColorNotation.HSL?e.serializeHSL(t):e.serializeRGB(t)})),u=o.stringify(c);u!==i&&(l.cloneBefore({value:u}),s?.preserve||l.remove())}});basePlugin.postcss=!0;const postcssPlugin=e=>{const t=Object.assign({preserve:!1,enableProgressiveCustomProperties:!0},e);return t.enableProgressiveCustomProperties&&t.preserve?{postcssPlugin:"postcss-color-functional-notation",plugins:[s(),basePlugin(t)]}:basePlugin(t)};postcssPlugin.postcss=!0,module.exports=postcssPlugin; diff --git a/node_modules/postcss-color-functional-notation/dist/index.d.ts b/node_modules/postcss-color-functional-notation/dist/index.d.ts deleted file mode 100644 index 096f1f4f..00000000 --- a/node_modules/postcss-color-functional-notation/dist/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { PluginCreator } from 'postcss'; - -/** postcss-color-functional-notation plugin options */ -export declare type pluginOptions = { - /** Preserve the original notation. default: false */ - preserve?: boolean; - /** Enable "@csstools/postcss-progressive-custom-properties". default: true */ - enableProgressiveCustomProperties?: boolean; -}; - -declare const postcssPlugin: PluginCreator<pluginOptions>; -export default postcssPlugin; - -export { } diff --git a/node_modules/postcss-color-functional-notation/dist/index.mjs b/node_modules/postcss-color-functional-notation/dist/index.mjs deleted file mode 100644 index 59f8809a..00000000 --- a/node_modules/postcss-color-functional-notation/dist/index.mjs +++ /dev/null @@ -1 +0,0 @@ -import s from"@csstools/postcss-progressive-custom-properties";import{color as o,SyntaxFlag as t,ColorNotation as e,serializeHSL as r,serializeRGB as a}from"@csstools/css-color-parser";import{hasFallback as n,hasSupportsAtRuleAncestor as c}from"@csstools/utilities";import{replaceComponentValues as i,parseCommaSeparatedListOfComponentValues as l,isFunctionNode as p,stringify as g}from"@csstools/css-parser-algorithms";import{tokenize as u}from"@csstools/css-tokenizer";const m=/^(?:rgb|hsl)a?$/i,f=/\b(?:rgb|hsl)a?\(/i,basePlugin=s=>({postcssPlugin:"postcss-color-functional-notation",Declaration(v){const h=v.value;if(!f.test(h))return;if(n(v))return;if(c(v,f))return;const y=i(l(u({css:h})),(s=>{if(!p(s)||!m.test(s.getName()))return;const n=o(s);return!n||n.syntaxFlags.has(t.Experimental)||n.syntaxFlags.has(t.HasNoneKeywords)||n.syntaxFlags.has(t.RelativeColorSyntax)||(n.syntaxFlags.has(t.LegacyRGB)||n.syntaxFlags.has(t.LegacyHSL))&&!n.syntaxFlags.has(t.HasPercentageAlpha)?void 0:n.colorNotation===e.HSL?r(n):a(n)})),x=g(y);x!==h&&(v.cloneBefore({value:x}),s?.preserve||v.remove())}});basePlugin.postcss=!0;const postcssPlugin=o=>{const t=Object.assign({preserve:!1,enableProgressiveCustomProperties:!0},o);return t.enableProgressiveCustomProperties&&t.preserve?{postcssPlugin:"postcss-color-functional-notation",plugins:[s(),basePlugin(t)]}:basePlugin(t)};postcssPlugin.postcss=!0;export{postcssPlugin as default}; diff --git a/node_modules/postcss-color-functional-notation/package.json b/node_modules/postcss-color-functional-notation/package.json deleted file mode 100644 index d2ba08cd..00000000 --- a/node_modules/postcss-color-functional-notation/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "postcss-color-functional-notation", - "description": "Use space and slash separated color notation in CSS", - "version": "6.0.14", - "author": "Jonathan Neal <jonathantneal@hotmail.com>", - "license": "MIT-0", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "engines": { - "node": "^14 || ^16 || >=18" - }, - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.mjs", - "exports": { - ".": { - "import": { - "types": "./dist/index.d.ts", - "default": "./dist/index.mjs" - }, - "require": { - "default": "./dist/index.cjs" - } - } - }, - "files": [ - "CHANGELOG.md", - "LICENSE.md", - "README.md", - "dist" - ], - "dependencies": { - "@csstools/css-color-parser": "^2.0.4", - "@csstools/css-parser-algorithms": "^2.7.1", - "@csstools/css-tokenizer": "^2.4.1", - "@csstools/postcss-progressive-custom-properties": "^3.3.0", - "@csstools/utilities": "^1.0.0" - }, - "peerDependencies": { - "postcss": "^8.4" - }, - "scripts": {}, - "homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-functional-notation#readme", - "repository": { - "type": "git", - "url": "git+https://github.com/csstools/postcss-plugins.git", - "directory": "plugins/postcss-color-functional-notation" - }, - "bugs": "https://github.com/csstools/postcss-plugins/issues", - "keywords": [ - "color", - "comma", - "css", - "design", - "functional", - "hsl", - "hsla", - "hwb", - "notation", - "postcss", - "postcss-plugin", - "rgb", - "rgba", - "space", - "syntax" - ] -} |
