-
Notifications
You must be signed in to change notification settings - Fork 6
dynamic variables #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @amirjr1378, thanks! Could you explain us a little bit more about this. What are you trying to achive? or maybe the problem you are trying to resolve Any information would be valuable because I don't quite understand the request. |
hi again @randomeduc. |
This might be relevant: https://ant.design/docs/react/customize-theme-variable |
IMHO, using a regex to replace them would not be an optimal solution. I think lots of colors get generated using less functions (darken, fade, etc) taking the aforementioned variables as base, doing it so would only work in the ones that match exactly with the color chosen. In the other hand, if two vars end being of the same color it would be impossible to differentiate which one you are trying to replace since the method works in a per-color basis. I don't know if the plugin handles those scenarios. A quick test just didn't let me compile the .less file using something like While still experimental, seems that antd is working in bringing this feature first-party as jugglingcats pointed us in the comment above. Maybe it'd be preferable to stay tuned to this and try to build something from there. |
hey, nice job.
i want to make variables dynamic using css variables, i mean change all of less variables to css variable when we are using less.render.i think we can achieve that with some plugins like https://github.com/miyamarisubs/less-plugin-custom-properties
The text was updated successfully, but these errors were encountered: