【发布时间】:2019-01-12 23:35:42
【问题描述】:
问题:
- 在 sass 文件中正确使用 calc 函数。
案例:
.class1 {
max-width: calc(100% - #{$endWidth});
min-width: $startWidth;
text-overflow: ellipsis;
}
.class2 {
max-width: calc(100% - #{$startWidth});
direction: rtl;
}
案例:
我在堆栈溢出中验证了几个答案,并且从其中一个问题的答案中激发了我的问题 - Stack Overflow Reference。解决方案不适用于我的场景,
我应该在 sass 中使用 mixin 来让它工作吗?
【问题讨论】:
-
@A.Sakkeer 你读过这个问题吗? OP 已经尝试过了
标签: css sass interpolation css-variables