File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 49
49
};
50
50
%}
51
51
52
- number -> ( [0-9] :+) {% d => Number (text (d)) %}
52
+ number
53
+ -> "-" :? ( [0-9] :? "." [0-9] :+ | [1-9] [0-9] :* | "0" ) {% d => Number (text (d)) %}
53
54
54
55
angle -> number ( "deg" | "rad" ) {% text %}
55
56
Original file line number Diff line number Diff line change @@ -17,6 +17,24 @@ it('allows decimal values', () => runTest([
17
17
[ 'top' , '1.5' ] ,
18
18
] , { top : 1.5 } ) ) ;
19
19
20
+ it ( 'allows decimal values in transformed values' , ( ) => runTest ( [
21
+ [ 'border-radius' , '1.5' ] ,
22
+ ] , {
23
+ borderTopLeftRadius : 1.5 ,
24
+ borderTopRightRadius : 1.5 ,
25
+ borderBottomRightRadius : 1.5 ,
26
+ borderBottomLeftRadius : 1.5 ,
27
+ } ) ) ;
28
+
29
+ it ( 'allows negative values in transformed values' , ( ) => runTest ( [
30
+ [ 'border-radius' , '-1.5' ] ,
31
+ ] , {
32
+ borderTopLeftRadius : - 1.5 ,
33
+ borderTopRightRadius : - 1.5 ,
34
+ borderBottomRightRadius : - 1.5 ,
35
+ borderBottomLeftRadius : - 1.5 ,
36
+ } ) ) ;
37
+
20
38
it ( 'transforms strings' , ( ) => runTest ( [
21
39
[ 'color' , 'red' ] ,
22
40
] , { color : 'red' } ) ) ;
You can’t perform that action at this time.
0 commit comments