postcss / postcss-custom-properties

Use Custom Properties in CSS
https://postcss.github.io/postcss-custom-properties
MIT License
596 stars 77 forks source link

PostCSS log var(--property) warnings not triggered by postcss when the variable references an undeclared variable #113

Closed oleersoy closed 5 years ago

oleersoy commented 6 years ago

This issue references the previous issue I filed with the same title, BUT I will provide a much simpler explanation. If you have some CSS variables declared like this:

:root {
    --color-gray-light: blue;
}

:root {
    --color-abbr-border:             var(--color-light-gray);
  }

PostCSS will not warn when building this. However if this is packaged up as a module, and imported by an upstream project, then postcss will warn that it cannot resolve the variable --color-light-gray;