html - 在这个 mixin 的 @if 语句中,为什么这个大于运算符不起作用?
问题描述
.container {
--random: 200px;
@mixin test() {
@if (var(--random) > 500px) {
color: orange;
}
}
@include test();
}
我想要什么:如果变量大于 500px,则.container
使用color: orange;
.
PS我不知道如何制作一个代码片段来为你重现这个错误。也许有一个网站可以制作您可以建议的小 SASS 片段?
解决方案
推荐阅读
- python - 比较列表中的数字时出现索引错误
- typescript - 如何使用打字稿正确创建表格
- apache-flink - Flink 在发送停止命令时会完成 sink 进程吗
- javascript - 在 REACT 组件之间传递函数
- php - 按支付网关过滤 woocommerce 订单(仅限活动支付网关)
- ruby-on-rails - _rails_command:10:找不到命令:通过gem安装后的rails
- java - 设置构造函数值而不传递它们的值
- python - 尝试安装 CartoPy 时出现 Cinda CUDA 驱动程序问题
- qstandarditemmodel - 如何避免QTableView中垂直滚动条占位符的丑陋空白?
- go - Unexpected Addition Behaviour of two Uint64