File tree 1 file changed +5
-7
lines changed
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 1
- import $ from 'jquery' ;
2
-
3
- const $typographyEntries = $ ( '#component-typography tbody tr' ) ;
1
+ const typographyEntries = document . querySelectorAll ( '#component-typography tbody tr' ) ;
4
2
5
3
function calculateFontSizes ( ) {
6
- $ typographyEntries. each ( function ( ) {
7
- const $ fontSizeInfo = $ ( this ) . find ( '.br-typography-sample-size' ) ;
8
- const fontSizeForElement = $ ( this ) . find ( '.br-typography-sample-content' ) . children ( ) . first ( ) . css ( 'font-size' ) ;
9
- $ fontSizeInfo. text ( fontSizeForElement ) ;
4
+ typographyEntries . forEach ( function ( element ) {
5
+ const fontSizeInfo = element . querySelector ( '.br-typography-sample-size' ) ;
6
+ const fontSizeForElement = getComputedStyle ( element . querySelector ( '.br-typography-sample-content' ) . children [ 0 ] ) [ 'font-size' ] ;
7
+ fontSizeInfo . innerText = fontSizeForElement ;
10
8
} ) ;
11
9
}
12
10
You can’t perform that action at this time.
0 commit comments