I have the following LESS variable: @yellow:#fbba00;
I want to apply this color to the background of a tr
with opacity: 0.2
.
I tried the following, but the problem is that the opacity is applied to the whole tr, and not only to the background.
I saw several topics dealing with background opacities (1, 2), but they always use rgba()
to set the color. It does not match what I am looking for (LESS variable).
In LESS/CSS file:
@yellow: #fbba00;
.bg-light-yellow {
background-color: @yellow;
opacity: 0.2;
}
In HTML page:
<tr class="bg-light-yellow">
...
</tr>