diff options
Diffstat (limited to 'node_modules/postcss-reduce-initial')
11 files changed, 0 insertions, 630 deletions
diff --git a/node_modules/postcss-reduce-initial/LICENSE-MIT b/node_modules/postcss-reduce-initial/LICENSE-MIT deleted file mode 100644 index fd0e863a..00000000 --- a/node_modules/postcss-reduce-initial/LICENSE-MIT +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) Ben Briggs <beneb.info@gmail.com> (http://beneb.info) - -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, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -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-reduce-initial/README.md b/node_modules/postcss-reduce-initial/README.md deleted file mode 100644 index d45d922b..00000000 --- a/node_modules/postcss-reduce-initial/README.md +++ /dev/null @@ -1,92 +0,0 @@ -# [postcss][postcss]-reduce-initial - -> Reduce `initial` definitions to the _actual_ initial value, where possible. - -## Install - -With [npm](https://npmjs.org/package/postcss-reduce-initial) do: - -``` -npm install postcss-reduce-initial --save -``` - -## Examples - -See the [data](data) for more conversions. This data is courtesy -of Mozilla. - -### Convert `initial` values - -When the `initial` keyword is longer than the property value, it will -be converted: - -#### Input - -```css -h1 { - min-width: initial; -} -``` - -#### Output - -```css -h1 { - min-width: auto; -} -``` - -### Convert values back to `initial` - -When the `initial` value is smaller than the property value, it will -be converted: - -#### Input - -```css -h1 { - transform-box: border-box; -} -``` - -#### Output - -```css -h1 { - transform-box: initial; -} -``` - -This conversion is only applied when you supply a browsers list that all support -the `initial` keyword; it's worth noting that Internet Explorer has no support. - -## API - -### reduceInitial([options]) - -#### options - -##### ignore - -Type: `Array<String>` -Default: `undefined` - -It contains the Array of properties that will be ignored while reducing its value to initial. -Example : `{ ignore : ["min-height"] }` - -## Usage - -See the [PostCSS documentation](https://github.com/postcss/postcss#usage) for -examples for your environment. - -## Contributors - -See [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/master/CONTRIBUTORS.md). - -## License - -This program uses a list of CSS properties derived from data maintained my the MDN team at Mozilla and licensed under the [CC0 1.0 Universal Public Domain Dedication](https://creativecommons.org/publicdomain/zero/1.0/). - -MIT © [Ben Briggs](http://beneb.info) - -[postcss]: https://github.com/postcss/postcss diff --git a/node_modules/postcss-reduce-initial/package.json b/node_modules/postcss-reduce-initial/package.json deleted file mode 100644 index 74096d26..00000000 --- a/node_modules/postcss-reduce-initial/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "postcss-reduce-initial", - "version": "6.1.0", - "description": "Reduce initial definitions to the actual initial value, where possible.", - "main": "src/index.js", - "types": "types/index.d.ts", - "files": [ - "src", - "LICENSE-MIT", - "types" - ], - "keywords": [ - "css", - "postcss", - "postcss-plugin" - ], - "license": "MIT", - "homepage": "https://github.com/cssnano/cssnano", - "author": { - "name": "Ben Briggs", - "email": "beneb.info@gmail.com", - "url": "http://beneb.info" - }, - "repository": "cssnano/cssnano", - "dependencies": { - "browserslist": "^4.23.0", - "caniuse-api": "^3.0.0" - }, - "bugs": { - "url": "https://github.com/cssnano/cssnano/issues" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "devDependencies": { - "@types/caniuse-api": "^3.0.6", - "html-to-text": "^9.0.5", - "postcss": "^8.4.35" - }, - "peerDependencies": { - "postcss": "^8.4.31" - }, - "scripts": { - "acquire": "node ./src/script/acquire.mjs" - } -}
\ No newline at end of file diff --git a/node_modules/postcss-reduce-initial/src/data/fromInitial.json b/node_modules/postcss-reduce-initial/src/data/fromInitial.json deleted file mode 100644 index 0bc22813..00000000 --- a/node_modules/postcss-reduce-initial/src/data/fromInitial.json +++ /dev/null @@ -1,321 +0,0 @@ -{ - "accent-color": "auto", - "align-content": "normal", - "align-items": "normal", - "align-self": "auto", - "align-tracks": "normal", - "animation-delay": "0s", - "animation-direction": "normal", - "animation-duration": "0s", - "animation-fill-mode": "none", - "animation-iteration-count": "1", - "animation-name": "none", - "animation-range-end": "normal", - "animation-range-start": "normal", - "animation-timing-function": "ease", - "animation-timeline": "auto", - "appearance": "none", - "aspect-ratio": "auto", - "azimuth": "center", - "backdrop-filter": "none", - "background-attachment": "scroll", - "background-blend-mode": "normal", - "background-image": "none", - "background-position": "0% 0%", - "background-position-x": "0%", - "background-position-y": "0%", - "background-repeat": "repeat", - "block-size": "auto", - "border-block-style": "none", - "border-block-width": "medium", - "border-block-end-style": "none", - "border-block-end-width": "medium", - "border-block-start-style": "none", - "border-block-start-width": "medium", - "border-bottom-left-radius": "0", - "border-bottom-right-radius": "0", - "border-bottom-style": "none", - "border-bottom-width": "medium", - "border-end-end-radius": "0", - "border-end-start-radius": "0", - "border-image-outset": "0", - "border-image-slice": "100%", - "border-image-source": "none", - "border-image-width": "1", - "border-inline-style": "none", - "border-inline-width": "medium", - "border-inline-end-style": "none", - "border-inline-end-width": "medium", - "border-inline-start-style": "none", - "border-inline-start-width": "medium", - "border-left-style": "none", - "border-left-width": "medium", - "border-right-style": "none", - "border-right-width": "medium", - "border-spacing": "0", - "border-start-end-radius": "0", - "border-start-start-radius": "0", - "border-top-left-radius": "0", - "border-top-right-radius": "0", - "border-top-style": "none", - "border-top-width": "medium", - "bottom": "auto", - "box-decoration-break": "slice", - "box-shadow": "none", - "break-after": "auto", - "break-before": "auto", - "break-inside": "auto", - "caption-side": "top", - "caret-color": "auto", - "caret-shape": "auto", - "clear": "none", - "clip": "auto", - "clip-path": "none", - "color-scheme": "normal", - "column-count": "auto", - "column-gap": "normal", - "column-rule-style": "none", - "column-rule-width": "medium", - "column-span": "none", - "column-width": "auto", - "contain": "none", - "contain-intrinsic-block-size": "none", - "contain-intrinsic-height": "none", - "contain-intrinsic-inline-size": "none", - "contain-intrinsic-width": "none", - "container-name": "none", - "container-type": "normal", - "content": "normal", - "counter-increment": "none", - "counter-reset": "none", - "counter-set": "none", - "cursor": "auto", - "direction": "ltr", - "empty-cells": "show", - "filter": "none", - "flex-basis": "auto", - "flex-direction": "row", - "flex-grow": "0", - "flex-shrink": "1", - "flex-wrap": "nowrap", - "float": "none", - "font-feature-settings": "normal", - "font-kerning": "auto", - "font-language-override": "normal", - "font-optical-sizing": "auto", - "font-palette": "normal", - "font-variation-settings": "normal", - "font-size": "medium", - "font-size-adjust": "none", - "font-stretch": "normal", - "font-style": "normal", - "font-synthesis-position": "none", - "font-synthesis-small-caps": "auto", - "font-synthesis-style": "auto", - "font-synthesis-weight": "auto", - "font-variant": "normal", - "font-variant-alternates": "normal", - "font-variant-caps": "normal", - "font-variant-east-asian": "normal", - "font-variant-emoji": "normal", - "font-variant-ligatures": "normal", - "font-variant-numeric": "normal", - "font-variant-position": "normal", - "font-weight": "normal", - "forced-color-adjust": "auto", - "grid-auto-columns": "auto", - "grid-auto-flow": "row", - "grid-auto-rows": "auto", - "grid-column-end": "auto", - "grid-column-gap": "0", - "grid-column-start": "auto", - "grid-row-end": "auto", - "grid-row-gap": "0", - "grid-row-start": "auto", - "grid-template-areas": "none", - "grid-template-columns": "none", - "grid-template-rows": "none", - "hanging-punctuation": "none", - "height": "auto", - "hyphenate-character": "auto", - "hyphenate-limit-chars": "auto", - "hyphens": "manual", - "image-rendering": "auto", - "image-resolution": "1dppx", - "ime-mode": "auto", - "initial-letter": "normal", - "initial-letter-align": "auto", - "inline-size": "auto", - "input-security": "auto", - "inset-block-end": "auto", - "inset-block-start": "auto", - "inset-inline-end": "auto", - "inset-inline-start": "auto", - "isolation": "auto", - "justify-content": "normal", - "justify-items": "legacy", - "justify-self": "auto", - "justify-tracks": "normal", - "left": "auto", - "letter-spacing": "normal", - "line-break": "auto", - "line-clamp": "none", - "line-height": "normal", - "line-height-step": "0", - "list-style-image": "none", - "list-style-type": "disc", - "margin-block-end": "0", - "margin-block-start": "0", - "margin-bottom": "0", - "margin-inline-end": "0", - "margin-inline-start": "0", - "margin-left": "0", - "margin-right": "0", - "margin-top": "0", - "margin-trim": "none", - "mask-border-mode": "alpha", - "mask-border-outset": "0", - "mask-border-slice": "0", - "mask-border-source": "none", - "mask-border-width": "auto", - "mask-composite": "add", - "mask-image": "none", - "mask-position": "0% 0%", - "mask-repeat": "repeat", - "mask-size": "auto", - "masonry-auto-flow": "pack", - "math-depth": "0", - "math-shift": "normal", - "math-style": "normal", - "max-block-size": "none", - "max-height": "none", - "max-inline-size": "none", - "max-lines": "none", - "max-width": "none", - "min-block-size": "0", - "min-height": "auto", - "min-inline-size": "0", - "min-width": "auto", - "mix-blend-mode": "normal", - "object-fit": "fill", - "offset-anchor": "auto", - "offset-distance": "0", - "offset-path": "none", - "offset-position": "normal", - "offset-rotate": "auto", - "opacity": "1", - "order": "0", - "orphans": "2", - "outline-offset": "0", - "outline-style": "none", - "outline-width": "medium", - "overflow-anchor": "auto", - "overflow-block": "auto", - "overflow-clip-margin": "0px", - "overflow-inline": "auto", - "overflow-wrap": "normal", - "overlay": "none", - "overscroll-behavior": "auto", - "overscroll-behavior-block": "auto", - "overscroll-behavior-inline": "auto", - "overscroll-behavior-x": "auto", - "overscroll-behavior-y": "auto", - "padding-block-end": "0", - "padding-block-start": "0", - "padding-bottom": "0", - "padding-inline-end": "0", - "padding-inline-start": "0", - "padding-left": "0", - "padding-right": "0", - "padding-top": "0", - "page": "auto", - "page-break-after": "auto", - "page-break-before": "auto", - "page-break-inside": "auto", - "paint-order": "normal", - "perspective": "none", - "pointer-events": "auto", - "position": "static", - "resize": "none", - "right": "auto", - "rotate": "none", - "row-gap": "normal", - "scale": "none", - "scrollbar-color": "auto", - "scrollbar-gutter": "auto", - "scrollbar-width": "auto", - "scroll-behavior": "auto", - "scroll-margin-block-start": "0", - "scroll-margin-block-end": "0", - "scroll-margin-bottom": "0", - "scroll-margin-inline-start": "0", - "scroll-margin-inline-end": "0", - "scroll-margin-left": "0", - "scroll-margin-right": "0", - "scroll-margin-top": "0", - "scroll-padding-block-start": "auto", - "scroll-padding-block-end": "auto", - "scroll-padding-bottom": "auto", - "scroll-padding-inline-start": "auto", - "scroll-padding-inline-end": "auto", - "scroll-padding-left": "auto", - "scroll-padding-right": "auto", - "scroll-padding-top": "auto", - "scroll-snap-align": "none", - "scroll-snap-coordinate": "none", - "scroll-snap-points-x": "none", - "scroll-snap-points-y": "none", - "scroll-snap-stop": "normal", - "scroll-snap-type": "none", - "scroll-snap-type-x": "none", - "scroll-snap-type-y": "none", - "scroll-timeline-axis": "block", - "scroll-timeline-name": "none", - "shape-image-threshold": "0.0", - "shape-margin": "0", - "shape-outside": "none", - "tab-size": "8", - "table-layout": "auto", - "text-align-last": "auto", - "text-combine-upright": "none", - "text-decoration-line": "none", - "text-decoration-skip-ink": "auto", - "text-decoration-style": "solid", - "text-decoration-thickness": "auto", - "text-emphasis-style": "none", - "text-indent": "0", - "text-justify": "auto", - "text-orientation": "mixed", - "text-overflow": "clip", - "text-rendering": "auto", - "text-shadow": "none", - "text-transform": "none", - "text-underline-offset": "auto", - "text-underline-position": "auto", - "text-wrap": "wrap", - "timeline-scope": "none", - "top": "auto", - "touch-action": "auto", - "transform": "none", - "transform-style": "flat", - "transition-behavior": "normal", - "transition-delay": "0s", - "transition-duration": "0s", - "transition-property": "all", - "transition-timing-function": "ease", - "translate": "none", - "unicode-bidi": "normal", - "user-select": "auto", - "view-timeline-axis": "block", - "view-timeline-inset": "auto", - "view-timeline-name": "none", - "view-transition-name": "none", - "white-space": "normal", - "widows": "2", - "width": "auto", - "will-change": "auto", - "word-break": "normal", - "word-spacing": "normal", - "word-wrap": "normal", - "z-index": "auto" -} diff --git a/node_modules/postcss-reduce-initial/src/data/toInitial.json b/node_modules/postcss-reduce-initial/src/data/toInitial.json deleted file mode 100644 index 13d582ff..00000000 --- a/node_modules/postcss-reduce-initial/src/data/toInitial.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "background-clip": "border-box", - "background-color": "transparent", - "background-origin": "padding-box", - "background-size": "auto auto", - "border-block-color": "currentcolor", - "border-block-end-color": "currentcolor", - "border-block-start-color": "currentcolor", - "border-bottom-color": "currentcolor", - "border-collapse": "separate", - "border-inline-color": "currentcolor", - "border-inline-end-color": "currentcolor", - "border-inline-start-color": "currentcolor", - "border-left-color": "currentcolor", - "border-right-color": "currentcolor", - "border-top-color": "currentcolor", - "box-sizing": "content-box", - "color": "canvastext", - "column-rule-color": "currentcolor", - "font-synthesis": "weight style small-caps position", - "image-orientation": "from-image", - "mask-clip": "border-box", - "mask-mode": "match-source", - "mask-origin": "border-box", - "mask-type": "luminance", - "ruby-align": "space-around", - "ruby-merge": "separate", - "ruby-position": "alternate", - "text-decoration-color": "currentcolor", - "text-emphasis-color": "currentcolor", - "text-emphasis-position": "over right", - "transform-box": "view-box", - "transform-origin": "50% 50% 0", - "vertical-align": "baseline", - "white-space-collapse": "collapse", - "writing-mode": "horizontal-tb" -} diff --git a/node_modules/postcss-reduce-initial/src/index.js b/node_modules/postcss-reduce-initial/src/index.js deleted file mode 100644 index 90d18a71..00000000 --- a/node_modules/postcss-reduce-initial/src/index.js +++ /dev/null @@ -1,80 +0,0 @@ -'use strict'; -const { dirname } = require('path'); -const browserslist = require('browserslist'); -const { isSupported } = require('caniuse-api'); -const fromInitial = require('./data/fromInitial.json'); -const toInitial = require('./data/toInitial.json'); -const ignoreProps = require('./lib/ignoreProps.js'); - -const initial = 'initial'; - -// In most of the browser including chrome the initial for `writing-mode` is not `horizontal-tb`. Ref https://github.com/cssnano/cssnano/pull/905 -const defaultIgnoreProps = ignoreProps; - -/** - * @typedef {{ overrideBrowserslist?: string | string[] }} AutoprefixerOptions - * @typedef {Pick<browserslist.Options, 'stats' | 'path' | 'env'>} BrowserslistOptions - * @typedef {{ignore?: string[]} & AutoprefixerOptions & BrowserslistOptions} Options - */ - -/** - * @type {import('postcss').PluginCreator<Options>} - * @param {Options} options - * @return {import('postcss').Plugin} - */ -function pluginCreator(options = {}) { - return { - postcssPlugin: 'postcss-reduce-initial', - - /** - * @param {import('postcss').Result & {opts: BrowserslistOptions & {file?: string}}} result - */ - prepare(result) { - const { stats, env, from, file } = result.opts || {}; - const browsers = browserslist(options.overrideBrowserslist, { - stats: options.stats || stats, - path: options.path || dirname(from || file || __filename), - env: options.env || env, - }); - - const initialSupport = isSupported('css-initial-value', browsers); - return { - OnceExit(css) { - css.walkDecls((decl) => { - const lowerCasedProp = decl.prop.toLowerCase(); - const ignoreProp = new Set( - defaultIgnoreProps.concat(options.ignore || []) - ); - - if (ignoreProp.has(lowerCasedProp)) { - return; - } - - if ( - initialSupport && - Object.prototype.hasOwnProperty.call(toInitial, lowerCasedProp) && - decl.value.toLowerCase() === - toInitial[/** @type {keyof toInitial} */ (lowerCasedProp)] - ) { - decl.value = initial; - return; - } - - if ( - decl.value.toLowerCase() !== initial || - !fromInitial[/** @type {keyof fromInitial} */ (lowerCasedProp)] - ) { - return; - } - - decl.value = - fromInitial[/** @type {keyof fromInitial} */ (lowerCasedProp)]; - }); - }, - }; - }, - }; -} - -pluginCreator.postcss = true; -module.exports = pluginCreator; diff --git a/node_modules/postcss-reduce-initial/src/lib/ignoreProps.js b/node_modules/postcss-reduce-initial/src/lib/ignoreProps.js deleted file mode 100644 index 86ac4d68..00000000 --- a/node_modules/postcss-reduce-initial/src/lib/ignoreProps.js +++ /dev/null @@ -1,2 +0,0 @@ -'use strict'; -module.exports = ['writing-mode', 'transform-box']; diff --git a/node_modules/postcss-reduce-initial/types/index.d.ts b/node_modules/postcss-reduce-initial/types/index.d.ts deleted file mode 100644 index bc7f5573..00000000 --- a/node_modules/postcss-reduce-initial/types/index.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -export = pluginCreator; -/** - * @typedef {{ overrideBrowserslist?: string | string[] }} AutoprefixerOptions - * @typedef {Pick<browserslist.Options, 'stats' | 'path' | 'env'>} BrowserslistOptions - * @typedef {{ignore?: string[]} & AutoprefixerOptions & BrowserslistOptions} Options - */ -/** - * @type {import('postcss').PluginCreator<Options>} - * @param {Options} options - * @return {import('postcss').Plugin} - */ -declare function pluginCreator(options?: Options): import('postcss').Plugin; -declare namespace pluginCreator { - export { postcss, AutoprefixerOptions, BrowserslistOptions, Options }; -} -type Options = { - ignore?: string[]; -} & AutoprefixerOptions & BrowserslistOptions; -declare var postcss: true; -type AutoprefixerOptions = { - overrideBrowserslist?: string | string[]; -}; -type BrowserslistOptions = Pick<browserslist.Options, 'stats' | 'path' | 'env'>; -import browserslist = require("browserslist"); -//# sourceMappingURL=index.d.ts.map
\ No newline at end of file diff --git a/node_modules/postcss-reduce-initial/types/index.d.ts.map b/node_modules/postcss-reduce-initial/types/index.d.ts.map deleted file mode 100644 index 355fb0eb..00000000 --- a/node_modules/postcss-reduce-initial/types/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":";AAaA;;;;GAIG;AAEH;;;;GAIG;AACH,yCAHW,OAAO,GACN,OAAO,SAAS,EAAE,MAAM,CAsDnC;;;;eA5DY;IAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;CAAC,GAAG,mBAAmB,GAAG,mBAAmB;;2BAF/D;IAAE,oBAAoB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAAE;2BAC5C,KAAK,oBAAoB,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC"}
\ No newline at end of file diff --git a/node_modules/postcss-reduce-initial/types/lib/ignoreProps.d.ts b/node_modules/postcss-reduce-initial/types/lib/ignoreProps.d.ts deleted file mode 100644 index c79fae84..00000000 --- a/node_modules/postcss-reduce-initial/types/lib/ignoreProps.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const _exports: string[]; -export = _exports; -//# sourceMappingURL=ignoreProps.d.ts.map
\ No newline at end of file diff --git a/node_modules/postcss-reduce-initial/types/lib/ignoreProps.d.ts.map b/node_modules/postcss-reduce-initial/types/lib/ignoreProps.d.ts.map deleted file mode 100644 index 92a05c2f..00000000 --- a/node_modules/postcss-reduce-initial/types/lib/ignoreProps.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ignoreProps.d.ts","sourceRoot":"","sources":["../../src/lib/ignoreProps.js"],"names":[],"mappings":""}
\ No newline at end of file |
