diff options
Diffstat (limited to 'node_modules/postcss-reduce-initial/src')
4 files changed, 0 insertions, 440 deletions
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']; |
