Skip to content

Commit

Permalink
Merge github.com:ui-devtools/tailwind-utils
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthkp committed Nov 14, 2022
2 parents a75fbfb + 770fc2d commit 584ee08
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<p align="center">
<img src="https://avatars2.githubusercontent.com/u/71650913?s=200&v=4" height="50px"/>
<br><br>
<b>Utilities to parse and create tailwind classnames</b>
<b>Utilities to parse and create tailwindcss classnames</b>
<br><br/>
<img src="https://github.com/ui-devtools/tailwind-utils/actions/workflows/test.yml/badge.svg"/>
<br><br>
<i>Extracted from the source code for <a href="https://www.ui-devtools.com">UI Devtools</a> and optimised for open source.</i>
</p>

&nbsp;
Expand Down Expand Up @@ -41,11 +43,17 @@ classname → definition:

```ts
const definition = parse('w-48');
// { prefix: 'w', property: 'width', value: '12rem' }
// { property: 'width', value: '12rem' }

const definition = parse('md:hover:bg-red-200/50');
// { responsiveModifier: 'md', pseudoModifier: 'hover', property: 'backgroundColor' value: '#fecaca80' }

/*
{
responsiveModifier: 'md',
pseudoModifier: 'hover',
property: 'backgroundColor'
value: '#fecaca80'
}
*/
```
<br/>

Expand Down

0 comments on commit 584ee08

Please sign in to comment.