Skip to content

Commit 8d87a41

Browse files
authored
postcss-custom-functions (#1928)
1 parent 7449a1f commit 8d87a41

188 files changed

Lines changed: 14430 additions & 26 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/ISSUE_TEMPLATE/css-issue.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ body:
8282
- PostCSS Container Rule Prelude List
8383
- PostCSS Content Alt Text
8484
- PostCSS Contrast Color Functions
85+
- PostCSS Custom Functions
8586
- PostCSS Custom Media Queries
8687
- PostCSS Custom Properties
8788
- PostCSS Custom Selectors

‎.github/ISSUE_TEMPLATE/plugin-issue.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ body:
7979
- PostCSS Container Rule Prelude List
8080
- PostCSS Content Alt Text
8181
- PostCSS Contrast Color Functions
82+
- PostCSS Custom Functions
8283
- PostCSS Custom Media Queries
8384
- PostCSS Custom Properties
8485
- PostCSS Custom Selectors

‎.github/labeler.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,12 @@
161161
- plugins/postcss-contrast-color-function/**
162162
- experimental/postcss-contrast-color-function/**
163163

164+
"plugins/postcss-custom-functions":
165+
- changed-files:
166+
- any-glob-to-any-file:
167+
- plugins/postcss-custom-functions/**
168+
- experimental/postcss-custom-functions/**
169+
164170
"plugins/postcss-custom-media":
165171
- changed-files:
166172
- any-glob-to-any-file:

‎package-lock.json‎

Lines changed: 61 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
package-lock.json
3+
yarn.lock
4+
*.result.css
5+
*.result.css.map
6+
*.result.json
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v26.1.0
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changes to Custom Function Parser
2+
3+
### Unreleased (major)
4+
5+
- Initial version
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
The MIT License (MIT)
2+
3+
Copyright 2022 Romain Menke, Antonio Laguna <antonio@laguna.es>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software is furnished to do so,
10+
subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Custom Function Parser <img src="https://cssdb.org/images/css.svg" alt="for CSS" width="90" height="90" align="right">
2+
3+
[<img alt="npm version" src="https://img.shields.io/npm/v/@csstools/custom-function-parser.svg" height="20">][npm-url]
4+
[<img alt="Build Status" src="https://github.com/csstools/postcss-plugins/actions/workflows/test.yml/badge.svg?branch=main" height="20">][cli-url]
5+
[<img alt="Discord" src="https://shields.io/badge/Discord-5865F2?logo=discord&logoColor=white">][discord]
6+
7+
Implemented from : https://www.w3.org/TR/mediaqueries-5/
8+
9+
## Usage
10+
11+
Add [Custom Function Parser] to your project:
12+
13+
```bash
14+
npm install @csstools/custom-function-parser @csstools/css-parser-algorithms @csstools/css-tokenizer --save-dev
15+
```
16+
17+
[Custom Function Parser] depends on our CSS tokenizer and parser algorithms.
18+
It must be used together with `@csstools/css-tokenizer` and `@csstools/css-parser-algorithms`.
19+
20+
```ts
21+
// TODO
22+
```
23+
24+
[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test
25+
[discord]: https://discord.gg/bUadyRwkJS
26+
[npm-url]: https://www.npmjs.com/package/@csstools/custom-function-parser
27+
28+
[Custom Function Parser]: https://github.com/csstools/postcss-plugins/tree/main/packages/custom-function-parser
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3+
"extends": "../../api-extractor.json",
4+
"docModel": {
5+
"enabled": true
6+
}
7+
}

0 commit comments

Comments
 (0)