Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View nileshbhagwat's full-sized avatar
🖖

Nilesh Bhagwat nileshbhagwat

🖖
View GitHub Profile
@nileshbhagwat
nileshbhagwat / JavaScript - getStyle
Last active February 28, 2020 09:27
Returns the value of a CSS rule for the specified element. Use Window.getComputedStyle() to get the value of the CSS rule for the specified element.
const getStyle = (el, ruleName) => getComputedStyle(el)[ruleName];