diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2026-05-18 23:10:59 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2026-05-18 23:41:44 +0800 |
| commit | fc87c009806dcc98867f6b58efe29b042aa01dee (patch) | |
| tree | 8f59b3f4a5b66e9dfef2d40c8d318e258a521228 /node_modules/@csstools/postcss-font-format-keywords | |
| parent | 3336b2356ee6152d9c6ae59bd9b87ccbc0958407 (diff) | |
node: updatemain
Diffstat (limited to 'node_modules/@csstools/postcss-font-format-keywords')
7 files changed, 0 insertions, 206 deletions
diff --git a/node_modules/@csstools/postcss-font-format-keywords/CHANGELOG.md b/node_modules/@csstools/postcss-font-format-keywords/CHANGELOG.md deleted file mode 100644 index 693b76c5..00000000 --- a/node_modules/@csstools/postcss-font-format-keywords/CHANGELOG.md +++ /dev/null @@ -1,21 +0,0 @@ -# Changes to PostCSS Font Format - -### 3.0.2 - -_February 19, 2024_ - -- Reuse code with `@csstools/utilities` - -### 3.0.1 - -_December 15, 2023_ - -- Fix type definitions - -### 3.0.0 - -_July 3, 2023_ - -- Change license to `MIT-0` ([read more about this change in the blog post](https://preset-env.cssdb.org/blog/license-change/)) - -[Full CHANGELOG](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-font-format-keywords/CHANGELOG.md) diff --git a/node_modules/@csstools/postcss-font-format-keywords/LICENSE.md b/node_modules/@csstools/postcss-font-format-keywords/LICENSE.md deleted file mode 100644 index e8ae93b9..00000000 --- a/node_modules/@csstools/postcss-font-format-keywords/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/@csstools/postcss-font-format-keywords/README.md b/node_modules/@csstools/postcss-font-format-keywords/README.md deleted file mode 100644 index 80e94141..00000000 --- a/node_modules/@csstools/postcss-font-format-keywords/README.md +++ /dev/null @@ -1,88 +0,0 @@ -# PostCSS Font Format [<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/@csstools/postcss-font-format-keywords.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/font-format-keywords.svg" height="20">][css-url] -[<img alt="CSS Standard Status" src="https://cssdb.org/images/badges/font-format-keywords.svg" height="20">][css-url] - -[PostCSS Font Format Keywords] lets you specify font formats as keywords, following the [CSS Fonts] specification. - -```pcss -@font-face { - src: url(file.woff2) format(woff2); -} - -/* becomes */ - -@font-face { - src: url(file.woff2) format("woff2"); -} -``` - -_See prior work by [valtlai](https://github.com/valtlai) here [postcss-font-format-keywords](https://github.com/valtlai/postcss-font-format-keywords) -To ensure long term maintenance and to provide the needed features this plugin was recreated based on valtlai's work._ - -## Usage - -Add [PostCSS Font Format Keywords] to your project: - -```bash -npm install postcss @csstools/postcss-font-format-keywords --save-dev -``` - -Use it as a [PostCSS] plugin: - -```js -const postcss = require('postcss'); -const postcssFontFormatKeywords = require('@csstools/postcss-font-format-keywords'); - -postcss([ - postcssFontFormatKeywords(/* pluginOptions */) -]).process(YOUR_CSS /*, processOptions */); -``` - -[PostCSS Font Format Keywords] runs in all Node environments, with special -instructions for: - -| [Node](INSTALL.md#node) | [PostCSS CLI](INSTALL.md#postcss-cli) | [Webpack](INSTALL.md#webpack) | [Gulp](INSTALL.md#gulp) | [Grunt](INSTALL.md#grunt) | -| --- | --- | --- | --- | --- | - -## Options - -### preserve - -The `preserve` option determines whether the original source -is preserved. By default, it is not preserved. - -```js -postcssFontFormatKeywords({ preserve: true }) -``` - -```pcss -@font-face { - src: url(file.woff2) format(woff2); -} - -/* becomes */ - -@font-face { - src: url(file.woff2) format("woff2"); - src: url(file.woff2) format(woff2); -} -``` - -[postcss]: https://github.com/postcss/postcss - -[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test -[css-url]: https://cssdb.org/#font-format-keywords -[discord]: https://discord.gg/bUadyRwkJS -[npm-url]: https://www.npmjs.com/package/@csstools/postcss-font-format-keywords - -[CSS Fonts]: https://www.w3.org/TR/css-fonts-4/#font-format-values -[Gulp PostCSS]: https://github.com/postcss/gulp-postcss -[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss -[PostCSS]: https://github.com/postcss/postcss -[PostCSS Loader]: https://github.com/postcss/postcss-loader -[PostCSS Font Format Keywords]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-font-format-keywords diff --git a/node_modules/@csstools/postcss-font-format-keywords/dist/index.cjs b/node_modules/@csstools/postcss-font-format-keywords/dist/index.cjs deleted file mode 100644 index c05d8bf0..00000000 --- a/node_modules/@csstools/postcss-font-format-keywords/dist/index.cjs +++ /dev/null @@ -1 +0,0 @@ -"use strict";var e=require("postcss-value-parser"),t=require("@csstools/utilities");const o=["woff","truetype","opentype","woff2","embedded-opentype","collection","svg"],creator=r=>{const s="preserve"in Object(r)&&Boolean(r?.preserve);return{postcssPlugin:"postcss-font-format-keywords",Declaration(r){if("src"!==r.prop.toLowerCase())return;if(!r.value.toLowerCase().includes("format("))return;if(t.hasFallback(r))return;const a=r.parent;if(!a||"atrule"!==a.type)return;if("font-face"!==a.name.toLowerCase())return;const n=e(r.value);n.walk((t=>{"function"===t.type&&"format"===t.value.toLowerCase()&&t.nodes.forEach((t=>{"word"===t.type&&o.includes(t.value.toLowerCase())&&(t.value=e.stringify({type:"string",value:t.value,quote:'"'}))}))})),n.toString()!==r.value&&(r.cloneBefore({value:n.toString()}),s||r.remove())}}};creator.postcss=!0,module.exports=creator; diff --git a/node_modules/@csstools/postcss-font-format-keywords/dist/index.d.ts b/node_modules/@csstools/postcss-font-format-keywords/dist/index.d.ts deleted file mode 100644 index 4bc6e82c..00000000 --- a/node_modules/@csstools/postcss-font-format-keywords/dist/index.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { PluginCreator } from 'postcss'; - -declare const creator: PluginCreator<pluginOptions>; -export default creator; - -/** postcss-font-format-keywords plugin options */ -export declare type pluginOptions = { - /** Preserve the original notation. default: false */ - preserve?: boolean; -}; - -export { } diff --git a/node_modules/@csstools/postcss-font-format-keywords/dist/index.mjs b/node_modules/@csstools/postcss-font-format-keywords/dist/index.mjs deleted file mode 100644 index 928242ae..00000000 --- a/node_modules/@csstools/postcss-font-format-keywords/dist/index.mjs +++ /dev/null @@ -1 +0,0 @@ -import e from"postcss-value-parser";import{hasFallback as t}from"@csstools/utilities";const o=["woff","truetype","opentype","woff2","embedded-opentype","collection","svg"],creator=r=>{const s="preserve"in Object(r)&&Boolean(r?.preserve);return{postcssPlugin:"postcss-font-format-keywords",Declaration(r){if("src"!==r.prop.toLowerCase())return;if(!r.value.toLowerCase().includes("format("))return;if(t(r))return;const n=r.parent;if(!n||"atrule"!==n.type)return;if("font-face"!==n.name.toLowerCase())return;const a=e(r.value);a.walk((t=>{"function"===t.type&&"format"===t.value.toLowerCase()&&t.nodes.forEach((t=>{"word"===t.type&&o.includes(t.value.toLowerCase())&&(t.value=e.stringify({type:"string",value:t.value,quote:'"'}))}))})),a.toString()!==r.value&&(r.cloneBefore({value:a.toString()}),s||r.remove())}}};creator.postcss=!0;export{creator as default}; diff --git a/node_modules/@csstools/postcss-font-format-keywords/package.json b/node_modules/@csstools/postcss-font-format-keywords/package.json deleted file mode 100644 index 2777403f..00000000 --- a/node_modules/@csstools/postcss-font-format-keywords/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "@csstools/postcss-font-format-keywords", - "description": "Use unquoted format on @font-face CSS definitions.", - "version": "3.0.2", - "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/utilities": "^1.0.0", - "postcss-value-parser": "^4.2.0" - }, - "peerDependencies": { - "postcss": "^8.4" - }, - "homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-font-format-keywords#readme", - "repository": { - "type": "git", - "url": "https://github.com/csstools/postcss-plugins.git", - "directory": "plugins/postcss-font-format-keywords" - }, - "keywords": [ - "css", - "embedded-opentype", - "font", - "font-format-keywords", - "format", - "opentype", - "postcss-plugin", - "truetype", - "woff", - "woff2" - ] -} |
