You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.
The problem is the way block scoping works on these variables. If you assign the variable inside an @if, that value is only applied inside that block… it doesn’t persist after the closing brace.
I don’t know if @if/@else should have different scoping rules, or if there should be a way to indicate you want a value to be applied up a scope, but I would like a way to accomplish this as well.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Can't precss assign variable inside if statement?
I use the following plugin. I can use calc at to assign variable.
https://github.com/postcss/postcss-calc
input code
output code
The text was updated successfully, but these errors were encountered: