From 275f9dc0bdf3e58aa36b800f55f8648fbc55d8af Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Thu, 4 Jan 2024 11:07:54 +0800 Subject: upgrade --- node_modules/@csstools/css-tokenizer/README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'node_modules/@csstools/css-tokenizer/README.md') diff --git a/node_modules/@csstools/css-tokenizer/README.md b/node_modules/@csstools/css-tokenizer/README.md index 810e47c8..ece9e1ef 100644 --- a/node_modules/@csstools/css-tokenizer/README.md +++ b/node_modules/@csstools/css-tokenizer/README.md @@ -6,6 +6,10 @@ Implemented from : https://www.w3.org/TR/2021/CRD-css-syntax-3-20211224/ +## API + +[Read the API docs](./docs/css-tokenizer.md) + ## Usage Add [CSS Tokenizer] to your project: @@ -17,7 +21,7 @@ npm install @csstools/css-tokenizer --save-dev ```js import { tokenizer, TokenType } from '@csstools/css-tokenizer'; -const myCSS = `@media only screen and (min-width: 768rem) { +const myCSS = `@media only screen and (min-width: 768rem) { .foo { content: 'Some content!' !important; } @@ -68,7 +72,6 @@ console.log(tokens); #### `onParseError` The tokenizer is forgiving and won't stop when a parse error is encountered. -Parse errors also aren't tokens. To receive parsing error information you can set a callback. @@ -87,8 +90,8 @@ while (true) { } ``` -Parser errors will try to inform you about the point in the tokenizer logic the error happened. -This tells you the kind of error. +Parser errors will try to inform you where in the tokenizer logic the error happened. +This tells you what kind of error occurred. ## Goals and non-goals -- cgit v1.2.3