File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed
Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ const tailwindcssVariables = require ( '../src/index' )
2+ const utils = require ( './util/_utils' ) ( __filename )
3+
4+ test ( 'issue 23' , async ( ) => {
5+ expect (
6+ await utils . diffOnly ( {
7+ content : [ utils . content ( ) ] ,
8+ darkMode : false ,
9+ theme : {
10+ variables : {
11+ DEFAULT : {
12+ // body
13+ 'body-color' : '#000' ,
14+ 'body-bg' : '#fff' ,
15+ 'body-font-family' : 'var(--font-primary)' ,
16+ 'body-font-size' : '1rem' ,
17+ 'body-font-weight' : '400' ,
18+ 'body-line-height' : '1.5' ,
19+ } ,
20+ } ,
21+ } ,
22+
23+ plugins : [ tailwindcssVariables ] ,
24+ } )
25+ ) . toMatchInlineSnapshot ( `
26+ "
27+
28+
29+ + :root {
30+ + --body-color: #000;
31+ + --body-bg: #fff;
32+ + --body-font-family: var(--font-primary);
33+ + --body-font-size: 1rem;
34+ + --body-font-weight: 400;
35+ + --body-line-height: 1.5
36+ + }
37+
38+ "
39+ ` )
40+ } )
You can’t perform that action at this time.
0 commit comments