Skip to content

Instantly share code, notes, and snippets.

@davidicus
Created March 1, 2018 17:23
Show Gist options
  • Save davidicus/56041c569c012dfa5925eb8db43f8ad9 to your computer and use it in GitHub Desktop.
Save davidicus/56041c569c012dfa5925eb8db43f8ad9 to your computer and use it in GitHub Desktop.
A snippit to grab specific css property using JS
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