Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在这里尝试一些简单的东西。我想根据一个主类设置全局变量。例如:
body.professional { $c1: #00B143; $c2: #151018; } .container { color: $c1; }
这可能吗?
谢谢!
知道了。简单的。
在单独的文件中构建所有 css 类,然后包含它。
body.professional { $c1: #00B143; $c2: #151018; @import 'base.scss'; } body.clientes { $c1: #4A8FE5; $c2: #393C42; @import 'base.scss'; }