File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -55,16 +55,17 @@ if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine
5555}
5656
5757var TOC_SCREEN_WIDTH_CUTOFF = 667
58+ var TOC_EM = '1.8em'
5859
5960if ( isMobile && window . screen . width < TOC_SCREEN_WIDTH_CUTOFF ) {
60- $ ( `code:contains(ToC)` ) . html ( TOC_MOBILE ) . css ( "line-height" , "1.8em" ) ;
61+ $ ( `code:contains(ToC)` ) . html ( TOC_MOBILE ) . css ( "line-height" , TOC_EM ) ;
6162}
6263
6364function updateToc ( ) {
6465 if ( isMobile && window . screen . width < TOC_SCREEN_WIDTH_CUTOFF ) {
65- $ ( `code:contains(ToC)` ) . html ( TOC_MOBILE ) . css ( "line-height" , "1.8em" ) ;
66+ $ ( `code:contains(ToC)` ) . html ( TOC_MOBILE ) . css ( "line-height" , TOC_EM ) ;
6667 } else {
67- $ ( `code:contains(ToC)` ) . html ( TOC ) . css ( "line-height" , "1.8em" ) ;
68+ $ ( `code:contains(ToC)` ) . html ( TOC ) . css ( "line-height" , TOC_EM ) ;
6869 }
6970}
7071window . addEventListener ( "orientationchange" , updateToc , false ) ;
You can’t perform that action at this time.
0 commit comments