Skip to content

Commit b670b0c

Browse files
authored
css-syntax-patches-for-csstree (#1466)
1 parent 2ffddb0 commit b670b0c

Some content is hidden

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

58 files changed

+66476
-402
lines changed

.github/labeler.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,22 @@
22
- changed-files:
33
- any-glob-to-any-file:
44
- .github/**
5+
- base-cli
56
- packages/base-cli/**
67
- packages/cascade-layer-name-parser/**
78
- packages/color-helpers/**
89
- packages/css-calc/**
910
- packages/css-color-parser/**
1011
- packages/css-parser-algorithms/**
12+
- packages/css-syntax-patches-for-csstree/**
1113
- packages/css-tokenizer/**
14+
- packages/generate-test-cases/**
1215
- packages/media-query-list-parser/**
16+
- packages/pack-test/**
1317
- packages/postcss-tape/**
18+
- packages/selector-resolve-nested/**
1419
- packages/selector-specificity/**
20+
- packages/utilities/**
1521
- plugins/postcss-base-plugin/**
1622
- plugins/postcss-debug-logger/**
1723
- rollup/**

package-lock.json

Lines changed: 375 additions & 401 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changes to CSS Syntax Patches For CSSTree
2+
3+
### Unreleased (patch)
4+
5+
- initial version
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
MIT No Attribution (MIT-0)
2+
3+
Copyright © CSSTools Contributors
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
9+
of the Software, and to permit persons to whom the Software is furnished to do
10+
so.
11+
12+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18+
SOFTWARE.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# CSS Syntax Patches For CSSTree
2+
3+
[<img alt="npm version" src="https://img.shields.io/npm/v/@csstools/css-syntax-patches-for-csstree.svg" height="20">][npm-url]
4+
[<img alt="Build Status" src="https://github.com/csstools/postcss-plugins/workflows/test/badge.svg" height="20">][cli-url]
5+
6+
Path [csstree](https://github.com/csstree/csstree) syntax definitions with the latest data from CSS specifications.
7+
8+
## Usage
9+
10+
```bash
11+
npm install @csstools/css-syntax-patches-for-csstree --save-dev
12+
```
13+
14+
```js
15+
import { fork } from 'css-tree-3.0.0';
16+
import syntax_patches from '@csstools/css-syntax-patches-for-csstree' with { type: 'json' };
17+
18+
const forkedLexer = fork({
19+
atrules: syntax_patches.next.atrules,
20+
properties: syntax_patches.next.properties,
21+
types: syntax_patches.next.types,
22+
}).lexer;
23+
```
24+
25+
## `next`
26+
27+
CSS specifications are often still in flux and various parts might change or disappear altogether.
28+
Specifications also contains parts that haven't been implemented yet in a browser.
29+
Only CSS that is widely adopted can be expected to be stable.
30+
31+
The `next` grouping contains a combination of what is currently valid in browsers and the progress in various specifications.
32+
33+
_In the future more groupings might be added._
34+
35+
[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test
36+
[npm-url]: https://www.npmjs.com/package/@csstools/css-syntax-patches-for-csstree

packages/css-syntax-patches-for-csstree/dist/index.json

Lines changed: 679 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"name": "@csstools/css-syntax-patches-for-csstree",
3+
"description": "CSS syntax patches for CSS tree",
4+
"version": "0.0.0",
5+
"contributors": [
6+
{
7+
"name": "Antonio Laguna",
8+
"email": "antonio@laguna.es",
9+
"url": "https://antonio.laguna.es"
10+
},
11+
{
12+
"name": "Romain Menke",
13+
"email": "romainmenke@gmail.com"
14+
}
15+
],
16+
"license": "MIT-0",
17+
"funding": [
18+
{
19+
"type": "github",
20+
"url": "https://github.com/sponsors/csstools"
21+
},
22+
{
23+
"type": "opencollective",
24+
"url": "https://opencollective.com/csstools"
25+
}
26+
],
27+
"engines": {
28+
"node": ">=18"
29+
},
30+
"main": "dist/index.json",
31+
"files": [
32+
"CHANGELOG.md",
33+
"LICENSE.md",
34+
"README.md",
35+
"dist"
36+
],
37+
"peerDependencies": {
38+
"postcss": "^8.4"
39+
},
40+
"devDependencies": {
41+
"@webref/css": "^6.15.2",
42+
"css-tree": "^2.3.1",
43+
"css-tree-3.0.0": "npm:css-tree@~3.0.0"
44+
},
45+
"scripts": {
46+
"build": "node ./scripts/index.mjs",
47+
"lint": "node ../../.github/bin/format-package-json.mjs",
48+
"prepublishOnly": "npm run build && npm run test",
49+
"test": "node --test"
50+
},
51+
"homepage": "https://github.com/csstools/postcss-plugins/tree/main/packages/css-syntax-patches-for-csstree#readme",
52+
"repository": {
53+
"type": "git",
54+
"url": "git+https://github.com/csstools/postcss-plugins.git",
55+
"directory": "packages/css-syntax-patches-for-csstree"
56+
},
57+
"bugs": "https://github.com/csstools/postcss-plugins/issues",
58+
"keywords": [
59+
"css",
60+
"csstree",
61+
"syntax"
62+
],
63+
"volta": {
64+
"extends": "../../package.json"
65+
}
66+
}

0 commit comments

Comments
 (0)