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 4949 };
5050%}
5151
52- number -> ( [0-9] :+) {% d => Number (text (d)) %}
52+ number
53+ -> "-" :? ( [0-9] :? "." [0-9] :+ | [1-9] [0-9] :* | "0" ) {% d => Number (text (d)) %}
5354
5455angle -> number ( "deg" | "rad" ) {% text %}
5556
Original file line number Diff line number Diff line change @@ -17,6 +17,24 @@ it('allows decimal values', () => runTest([
1717 [ 'top' , '1.5' ] ,
1818] , { top : 1.5 } ) ) ;
1919
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+
2038it ( 'transforms strings' , ( ) => runTest ( [
2139 [ 'color' , 'red' ] ,
2240] , { color : 'red' } ) ) ;
You can’t perform that action at this time.
0 commit comments