Created
March 1, 2018 17:23
-
-
Save davidicus/56041c569c012dfa5925eb8db43f8ad9 to your computer and use it in GitHub Desktop.
A snippit to grab specific css property using JS
This file contains hidden or 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
const tableBody = document.querySelector('.dataitems-table tbody'); | |
// can grab pseudo element styles by replacing null with selector | |
window.getComputedStyle(tableBody, null).getPropertyValue("padding-right"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment