I recently started using Less for writing CSS, and it has definitely been a time-saver for me. However, I have encountered a small issue with my code:
<a href="#" class="btn-black-bg btn-right-skew">largest fight gym in Australia</a>
Less
.btn{
position: relative;
padding: 15px 22px;
color: @color-black;
&-black-bg{
background: @color-black;
color: @color-white;
}
&-right-skew{
position: relative;
&:after{
content: '';
position: absolute;
right: -10px;
top: 0px;
width: 20px;
height: 100%;
.skewX(-15deg);
}
}
}
My objective now is to have the btn-right-skew
also show a black background if btn-black-bg
is present. In regular CSS, I could achieve this with the following code:
.btn-black-bg.btn-right-skew:after{
background: #000;
}
However, I am unsure how to accomplish this using LESS. Any help or suggestions would be greatly appreciated.