Created
July 28, 2023 22:10
-
-
Save matthewsimo/ad6b3d3c5f9e2d42f7e0c9225e652d28 to your computer and use it in GitHub Desktop.
Revisions
-
matthewsimo created this gist
Jul 28, 2023 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ let vars = new Map() for (const [prop, val] of document.documentElement.computedStyleMap()) { if (prop.startsWith('--')) { vars.set(prop, val[0][0]) } } for (const [k, v] of vars.entries()) { console.log(`${k}: ${v}`) }