做項目的時候遇到了使用混入方法不生效,但是才其他的選擇器裏面還可以生效,只是在自己寫的選擇器中不生效,後來發現了問題所在:
必須把/deep/ 必須放到選擇器後面寫,/deep/放到選擇器前面其他樣式生效,混入的方法@include background('color13');和
@include border(color6, "border-bottom");不生效所以切記/deep/放在選擇器的後面。
.collapse-menu /deep/ {
.el-collapse:last-child {
.el-collapse-item__header {
border-bottom: none;
}
.menuItem:last-child {
border-bottom: none;
}
}
.el-collapse-item__header {
height: $top-nav;
line-height: $top-nav;
padding-left: 10px;
@include background('color13');
@include border(color6, "border-bottom");
@include common-font-weight(1.4, 600, #555);
}
}