File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,44 @@ test('variants can be customized', () => {
159
159
. then ( ( result ) => expect ( result . css ) . toMatchCss ( expectedCss ) )
160
160
} )
161
161
162
+ test ( 'utilities can use decimal values' , ( ) => {
163
+ const testConfig = {
164
+ ...commonConfig ,
165
+ theme : {
166
+ textStrokeWidth : { '0.5' : '0.5px' } ,
167
+ } ,
168
+ safelist : [ ] ,
169
+ content : [
170
+ { raw : String . raw `<div class="text-stroke-0.5"></div>` } ,
171
+ ] ,
172
+ }
173
+ const expectedCss = `
174
+ .text-stroke-0\\.5 { -webkit-text-stroke-width: 0.5px }
175
+ `
176
+
177
+ return postcss ( tailwind ( testConfig ) ) . process ( '@tailwind utilities;' , { from : undefined } )
178
+ . then ( ( result ) => expect ( result . css ) . toMatchCss ( expectedCss ) )
179
+ } )
180
+
181
+ test ( 'utilities can use negative values' , ( ) => {
182
+ const testConfig = {
183
+ ...commonConfig ,
184
+ theme : {
185
+ textStrokeWidth : { '-4' : '-4px' } ,
186
+ } ,
187
+ safelist : [ ] ,
188
+ content : [
189
+ { raw : String . raw `<div class="-text-stroke-4"></div>` } ,
190
+ ] ,
191
+ }
192
+ const expectedCss = `
193
+ .-text-stroke-4 { -webkit-text-stroke-width: -4px }
194
+ `
195
+
196
+ return postcss ( tailwind ( testConfig ) ) . process ( '@tailwind utilities;' , { from : undefined } )
197
+ . then ( ( result ) => expect ( result . css ) . toMatchCss ( expectedCss ) )
198
+ } )
199
+
162
200
test ( 'utilities accept arbitrary values' , ( ) => {
163
201
const testConfig = {
164
202
...commonConfig ,
You can’t perform that action at this time.
0 commit comments