【发布时间】:2019-09-04 13:11:57
【问题描述】:
请问您对 Sass 源代码有什么问题有什么建议吗?
我想动态更改表格宽度。但是出现了错误:
错误:“.divTable-100%”后的 CSS 无效:预期占位符名称,在第 18 行是“”...
谢谢!
$tableWidth: () !default;
$tableWidth: map-merge(
(
"large": 100%,
"medium": 75%,
"small": 50%,
"extraSmall": 25%
),
$tableWidth
);
@mixin tableStyles {
margin-top: 25px;
display: table;
color: $tableColor;
border: $clBtnBorder;
}
@each $size, $size in $tableWidth {
.divTable-#{$size} {
width: $size !important;
@include tableStyles;
}
}
【问题讨论】: