csstools / postcss-preset-env

Convert modern CSS into something browsers understand
https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-preset-env
Creative Commons Zero v1.0 Universal
2.22k stars 90 forks source link

how to use custom properties set ? #197

Closed 779102260 closed 3 years ago

779102260 commented 3 years ago

like this

:root {
  --danger-theme: {
    color: white;
    background-color: red;
  }
}

.danger {
  @apply --danger-theme;
}
pascalduez commented 3 years ago

I would recommend moving away from this syntax since it will never be a standard. See https://github.com/pascalduez/postcss-apply#postcss-apply
In anyway it won't be part of postcss-preset-env.
Alernative, postcss-mixins or the like.

779102260 commented 3 years ago

I would recommend moving away from this syntax since it will never be a standard. See https://github.com/pascalduez/postcss-apply#postcss-apply In anyway it won't be part of postcss-preset-env. Alernative, postcss-mixins or the like.

get it, thx!