Skip to content

Commit e4c4ee9

Browse files
authored
Update README.md
1 parent ff65db7 commit e4c4ee9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
# Tailwindcss Class Parser
23

34
Tailwindcss Parser is an open-source library for parsing Tailwind CSS classes into an Abstract Syntax Tree (AST) and AST to classname. This allows for easier manipulation and analysis of Tailwind CSS classes in a declarative manner. If you are into a WYSIWYG like CMS builders this library can parse classes from blocks (or whatever you are using as a name for your components) or convert class definitions into classnames into your blocks.
@@ -25,7 +26,7 @@ To use the Tailwindcss Parser, you need to import the `parse` function from the
2526
```javascript
2627
import { parse } from '@xengine/tailwindcss-class-parser';
2728

28-
const ast = parse('lg:hover:text-red-500');
29+
const ast = parse('lg:hover:text-red-500/70');
2930

3031
console.log(ast);
3132
/*
@@ -39,7 +40,8 @@ Output:
3940
class: ["color"],
4041
raw: "red-500"
4142
},
42-
modifier: [
43+
modifier: "70",
44+
variants: [
4345
{
4446
kind: "named",
4547
type: "interaction",
@@ -98,5 +100,4 @@ Contributions are welcome! Please feel free to submit a pull request or open an
98100
## Acknowledgements
99101

100102
Special thanks to the Tailwind CSS team for their amazing work on Tailwind CSS.
101-
102-
@siddharthkp from https://github.com/ui-devtools/tailwind-utils
103+
[@siddharthkp](https://github.com/siddharthkp) from https://github.com/ui-devtools/tailwind-utils

0 commit comments

Comments
 (0)