在less我有以下幾點:如何將相同的樣式應用於所有直接的兒童課程?
.some-class{
> li{
a{
color: white;
background: @fti-lightgrey;
border-radius: 0px;
padding: 1px 15px;
// a color for the partcular tab that is chosen. (the color for each tab can be set inside mura)
&.orange{
&:hover{ background: @fti-orange; }
&:hover{ color: white; }
}
&.black {
&:hover{ background: black; }
&:hover{ color: white; }
}
&.topaz{
&:hover{ background: @fti-topaz; }
&:hover{ color: white; }
}
}
}
}
如何避免編寫&:hover{ color: white; }
多次?
有沒有辦法將這一行應用到a
標記內某處的所有直系階段後代?