find-css-vars

CLI tool to find CSS variables in a provided CSS file

Usage no npm install needed!

<script type="module">
  import findCssVars from 'https://cdn.skypack.dev/find-css-vars';
</script>

README

Find CSS Vars

CLI script to find all the (:root) CSS Variables in a given CSS file.

find-css-vars ./my.css [./output.json]

Note the output path is optional.

Example output:

{
  "--blue": "#007bff",
  "--indigo": "#6610f2"
}