-
-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e3e148a
commit 4b2fa2d
Showing
3 changed files
with
56 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# CSS Syntax Patches For CSSTree | ||
|
||
[<img alt="npm version" src="https://img.shields.io/npm/v/@csstools/css-syntax-patches-for-csstree.svg" height="20">][npm-url] | ||
[<img alt="Build Status" src="https://github.com/csstools/postcss-plugins/workflows/test/badge.svg" height="20">][cli-url] | ||
|
||
Path [csstree](https://github.com/csstree/csstree) syntax definitions with the latest data from CSS specifications. | ||
|
||
## Usage | ||
|
||
```bash | ||
npm install @csstools/css-syntax-patches-for-csstree --save-dev | ||
``` | ||
|
||
```js | ||
import { fork } from 'css-tree-3.0.0'; | ||
import syntax_patches from '@csstools/css-syntax-patches-for-csstree' with { type: 'json' }; | ||
|
||
const forkedLexer = fork({ | ||
atrules: syntax_patches.next.atrules, | ||
properties: syntax_patches.next.properties, | ||
types: syntax_patches.next.types, | ||
}).lexer; | ||
``` | ||
|
||
## `next` | ||
|
||
CSS specifications are often still in flux and various parts might change or disappear altogether. | ||
Specifications also contains parts that haven't been implemented yet in a browser. | ||
Only CSS that is widely adopted can be expected to be stable. | ||
|
||
The `next` grouping contains a combination of what is currently valid in browsers and the progress in various specifications. | ||
|
||
_In the future more groupings might be added._ | ||
|
||
[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test | ||
[npm-url]: https://www.npmjs.com/package/@csstools/css-syntax-patches-for-csstree |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters