我的尝试:
.breadcrumb {
&.main,
&.path {
& a:hover {
color: red;
}
}
}
.left-sidepanel {
.panel {
&-heading,
&-body a {
color: red;
}
}
}
结果:
.breadcrumb.main a:hover,
.breadcrumb.path a:hover {
color: red;
}
.left-sidepanel .panel-heading,
.left-sidepanel .panel-body a {
color: red;
}
所需结果
.breadcrumb.main a:hover,
.breadcrumb.path a:hover,
.left-sidepanel .panel-heading,
.left-sidepanel .panel-body a {
color: red;
}
我很感激你的想法。
答案 0 :(得分:0)
.breadcrumb {
&.main,
&.path {
a:hover {
color: red;
}
}
}
.left-sidepanel {
.panel {
&-heading,
&-body a {
&:extend(.breadcrumb.path a:hover);
}
}
}