postcss / postcss-custom-properties

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

support html selector in addition to :root #100

Closed halmos closed 5 years ago

halmos commented 6 years ago

We're currently running up against a bug with latest MS Edge in that when printing, variables declared in :root are no properly handled (bot the variables and fallbacks are ignored. See: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/16025710/). Using html, however, does work. Since :root and html are more-or-less synonymous, would it possible for this plugin to also support variable declarations in html?

jonathantneal commented 6 years ago

That sounds totally reasonable to me.

jagreehal commented 6 years ago

Should this be configurable so a user can expand what is supported with the default being root? For web components, I need :host to also be supported.

jonathantneal commented 6 years ago

@jagreehal, that gets tricky, because then we’d be determining scope.