File tree Expand file tree Collapse file tree 2 files changed +5
-15
lines changed Expand file tree Collapse file tree 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', () => {
9797 } )
9898} )
9999
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 ( )
109104} )
110105
111106it ( 'transforms font without quotes' , ( ) => {
Original file line number Diff line number Diff line change 44 SPACE ,
55 LENGTH ,
66 UNSUPPORTED_LENGTH_UNIT ,
7- NUMBER ,
87 SLASH ,
98} from '../tokenTypes'
109
@@ -46,11 +45,7 @@ export default tokenStream => {
4645 const fontSize = tokenStream . expect ( LENGTH , UNSUPPORTED_LENGTH_UNIT )
4746
4847 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 )
5449 }
5550
5651 tokenStream . expect ( SPACE )
You can’t perform that action at this time.
0 commit comments