File tree 2 files changed +5
-15
lines changed
2 files changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -97,15 +97,10 @@ it('omits line height if not specified', () => {
97
97
} )
98
98
} )
99
99
100
- it ( 'allows line height as multiple' , ( ) => {
101
- expect ( transformCss ( [ [ 'font' , '16px/1.5 "Helvetica"' ] ] ) ) . toEqual ( {
102
- fontFamily : 'Helvetica' ,
103
- fontSize : 16 ,
104
- fontWeight : 'normal' ,
105
- fontStyle : 'normal' ,
106
- fontVariant : [ ] ,
107
- lineHeight : 24 ,
108
- } )
100
+ it ( 'does not allow line height as multiple' , ( ) => {
101
+ expect ( ( ) => {
102
+ transformCss ( [ [ 'font' , '16px/1.5 "Helvetica"' ] ] )
103
+ } ) . toThrow ( )
109
104
} )
110
105
111
106
it ( 'transforms font without quotes' , ( ) => {
Original file line number Diff line number Diff line change 4
4
SPACE ,
5
5
LENGTH ,
6
6
UNSUPPORTED_LENGTH_UNIT ,
7
- NUMBER ,
8
7
SLASH ,
9
8
} from '../tokenTypes'
10
9
@@ -46,11 +45,7 @@ export default tokenStream => {
46
45
const fontSize = tokenStream . expect ( LENGTH , UNSUPPORTED_LENGTH_UNIT )
47
46
48
47
if ( tokenStream . matches ( SLASH ) ) {
49
- if ( tokenStream . matches ( NUMBER ) ) {
50
- lineHeight = fontSize * tokenStream . lastValue
51
- } else {
52
- lineHeight = tokenStream . expect ( LENGTH , UNSUPPORTED_LENGTH_UNIT )
53
- }
48
+ lineHeight = tokenStream . expect ( LENGTH , UNSUPPORTED_LENGTH_UNIT )
54
49
}
55
50
56
51
tokenStream . expect ( SPACE )
You can’t perform that action at this time.
0 commit comments