I have code rendered on server side that results in this HTML
<div>
<span> black/no color text </span>
<span class="degraded"> red colored text <span>
</div>
.degraded class sets the element's color to red but depending on settings that css class can also be .available or .unknown which will affect the color of the text.
Is there anyway by using only css or html data attributes etc. to give 1st span the same color as 2nd one ? I don't know the color of the 2nd span beforehand
UPDATE: sorry if I didn't explain well. The class in 2nd element could be whatever, the .degraded etc are just placeholders, I dont know the class name beforehand so I can't set the sibling with + selector in css. I need to somehow tell the second 1st span to take whatever color the 2nd span is. I CAN rearrange the order of the elements within div