【发布时间】:2020-04-27 14:24:53
【问题描述】:
我正在尝试动态更改我的应用程序主题颜色。我想通过 JavaScript 从服务器获取具有颜色值的对象,然后将这些值传递给 sass 变量。
我发现了很多关于此的文章,但其中一些对我没有任何帮助:
https://itnext.io/sharing-variables-between-js-and-sass-using-webpack-sass-loader-713f51fa7fa0
https://github.com/pmowrer/node-sass-json-importer#node-sass-json-importer
Is there a way to import variables from javascript to sass or vice versa?
https://frontend-cookbook.ack.ee/pages/implementation/SharingVariables.html
【问题讨论】:
标签: javascript css reactjs sass