postcss / postcss-custom-properties

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

Resolve variables in media queries #24

Closed hgl closed 9 years ago

hgl commented 9 years ago

As mentioned in https://gist.github.com/hgl/77f0141eea04817ee0af

I would like to make this plugin also resolve variables used in media queries (including custom media queries).

But I need your opinion on the breaking change to the preserve property I proposed in that gist (tl;dr enabling it doesn't fallback to specified values for resolvable values).

MoOx commented 9 years ago

This is invalid according to custom props specs so I won't add that into this module. I will close this issue when I will add a note about that in the Readme.

hgl commented 9 years ago

Is it because media queries don't inherit from the :root element?

MoOx commented 9 years ago

Yep.

WolfgangKluge commented 9 years ago

OK, here is a workaround (not in @custom-media so far) https://github.com/WolfgangKluge/postcss-media-variables

MoOx commented 9 years ago

You should use postcss-custom-media instead to stay in the future of CSS.

quantuminformation commented 7 years ago

I'm so happy about this!

joshistoast commented 3 years ago

You should use postcss-custom-media instead to stay in the future of CSS.

It's 2021 now, and this plugin hasn't been updated in 4 years and doesn't support PostCSS 7 or newer. Has anyone found a workaround or just decided to downgrade to PostCSS 6?

quantuminformation commented 3 years ago

i feel old

Spone commented 3 years ago

You should use postcss-custom-media instead to stay in the future of CSS.

It's 2021 now, and this plugin hasn't been updated in 4 years and doesn't support PostCSS 7 or newer. Has anyone found a workaround or just decided to downgrade to PostCSS 6?

v8.0.0 supports PostCSS 8