(f)
| 97 | |
| 98 | // every fitty element is tested for invalid styles |
| 99 | const computeStyle = (f) => { |
| 100 | // get style properties |
| 101 | const style = w.getComputedStyle(f.element, null); |
| 102 | |
| 103 | // get current font size in pixels (if we already calculated it, use the calculated version) |
| 104 | f.currentFontSize = parseFloat(style.getPropertyValue('font-size')); |
| 105 | |
| 106 | // get display type and wrap mode |
| 107 | f.display = style.getPropertyValue('display'); |
| 108 | f.whiteSpace = style.getPropertyValue('white-space'); |
| 109 | |
| 110 | // styles computed |
| 111 | return true; |
| 112 | }; |
| 113 | |
| 114 | // determines if this fitty requires initial styling, can be prevented by applying correct styles through CSS |
| 115 | const shouldPreStyle = (f) => { |
no outgoing calls
no test coverage detected
searching dependent graphs…