I have an app where certain elements can be confirmed. When they are created, they default to unconfirmed, and then later become confirmed. They can belong to another class A or B.
If they belong to A, I have a css rule that is
.a {
background-color: red
}
if they belong to B, the css is rule is
.b {
background-color: blue
}
Right now I have classes for unconfirmed and for confirmed. The classes add opacity of 1.0 if confirmed, and .5 if unconfirmed. My problem is that the .5 affects the text on the element too, which makes it cumbersome to read.
Ideally I could have something like .a { background-color: rgba (255,0,0,X) }
Is it possible to overwrite the alpha value only on another class? I don't want to assign color to the .confirmed or .unconfirmed class because it can change depending on if the class is .a or .b.