Menu

How to Get All Custom Properties on a Page in JavaScript

June 8th, 2020

We can use JavaScript to get the value of a CSS custom property. Robin wrote up a detailed explanation about this in Get a CSS Custom Property Value with JavaScript. To review, let’s say we’ve declared a single custom property on the HTML element: html {   –color-accent: #00eb9b; } In JavaScript, we can access…