Practical Guide

CSS Variables Extractor โ€” Usage Guide and Technical Principles

Extract CSS custom properties with their values, selectors, at-rules and line numbers. Repeated names remain separate in the declaration export.

Open tool

Overview

Extract CSS custom properties with their values, selectors, at-rules and line numbers. Repeated names remain separate in the declaration export.

Key concepts

Scope

Load the example to see a quoted semicolon and different values for the same name. Copy the list with scopes or the flat map, which keeps the last declaration per name.

Features

Scope

Extract CSS custom properties with their values, selectors, at-rules and line numbers. Repeated names remain separate in the declaration export.

Use Cases

Copy declarations as JSON

Load the example to see a quoted semicolon and different values for the same name. Copy the list with scopes or the flat map, which keeps the last declaration per name.

Frequently asked questions

What CSS custom properties does this extractor find?

Extract CSS custom properties with their values, selectors, at-rules and line numbers. Repeated names remain separate in the declaration export.

Can I use it for design token audits?

Load the example to see a quoted semicolon and different values for the same name. Copy the list with scopes or the flat map, which keeps the last declaration per name.

Related documentation

  • PostCSS ยท walkDecls()

    Extract CSS custom properties with their values, selectors, at-rules and line numbers. Repeated names remain separate in the declaration export.

CSS Variables Extractor

Open the tool to try these features.

Open tool