postcss / postcss-custom-properties

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

[README] example code is wrong about how to set preserve option #97

Closed simezi closed 6 years ago

simezi commented 6 years ago

Hi,

Related to #93

in current README.md, preserve is set under variables. https://github.com/postcss/postcss-custom-properties/blob/master/README.md#preserve

However, as far as I can see, preserve must be set under options https://github.com/postcss/postcss-custom-properties/blob/master/index.js#L169

This is very confusing and this might have something with to do with the issue below in postcss-cssnext . https://github.com/MoOx/postcss-cssnext/issues/324

Thanks.

jonathantneal commented 6 years ago

Hi @simezi, thanks for spotting this documentation issue. It’s fixed in https://github.com/postcss/postcss-custom-properties/commit/1b495ce1c5acb50f58c1bd4cc1f594b8468e37b8

The issue you’ve linked to is pretty old (2016) and probably unrelated. I recently started maintenance on this plugin, and I recently wrote up that documentation you found the issue in. Also, I changed the default options in PostCSS Custom Properties v7 to match the original poster’s expectations.