Replies: 1 comment 1 reply
-
Yes, this is exactly the changes of new event-based system of PostCSS 8. This system is more flexible and can solve circular dependencies issues (which can’t be solved by old order-based system). There are a few options:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, we recently upgraded our PostCSS and plugins to version 8. The order of plugins in the configuration remained unchanged. However, we’ve noticed that some of them are executing in an unexpected sequence. Specifically, the affected plugins are
postcss-mixins
andpostcss-simple-vars
.To pass multiple values as a single parameter, we define a variable and then pass it to a mixin (simplified example):
Previously, the mixin would be expanded first, and then the variable values would be substituted (which is the same order as in the configuration). However, now we observe that variables are substituted before resolving the mixin. As a result, the mixin interprets them as separate parameters, leading to unexpected CSS output:
It’s hard for me to tell whether this behavior is a bug in one of the plugins/PostCSS itself or maybe I'm missing something after the upgrade and there is a way to control this behavior and ensure that variables are not substituted too early. Alternatively, is there another approach to achieve our desired outcome?
Beta Was this translation helpful? Give feedback.
All reactions