One of the issues I am facing is related to a button with a span tag inside for the text. Occasionally, this button might be disabled, and my goal is to have it appear grey when in that state. However, I am encountering difficulties making this work properly. Below is the HTML code followed by the CSS:
<button disabled>
<span class="dark-disabled">Start New Game</span>
</button>
button:disabled span{
background: #ccc;
}
Interestingly, it seems to work when using a class selector instead:
button:disabled .dark-disabled{
background: #ccc;
}