Created
January 6, 2022 19:00
-
-
Save markhdavis/3c3399822ed7d8820bb8b2db4a0f88d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let para = document.querySelector('p'); | |
let compStyles = window.getComputedStyle(para); | |
para.textContent = 'My computed font-size is ' + | |
compStyles.getPropertyValue('font-size') + | |
',\nand my computed line-height is ' + | |
compStyles.getPropertyValue('line-height') + | |
'.'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment