Using `:first-of-type` with data attribute values?
Should I be able to use a CSS selector like
Background: I have a series of elements, each with a
Code Example: This is a simplified example of what I'm doing:
So, the question is, should
Thanks!
[data-progress="pending"]:first-of-type?Background: I have a series of elements, each with a
[data-progress='pending'|'done'] attribute. All elements start as pending and change to done when they finish (they complete in order). I want to set a darker background color for all of them to start. The first with a pending state I want to give a white background. When that one changes to done it would turn green and the next element would turn white. The result I'm getting is as if :first-of-type only recognizes the [data-progress] attribute itself and not the value. Is this the way it works or do I need to be looking for a bug in my code somewhere. I've Googled and MDN'ed and haven't been able to find an answer.Code Example: This is a simplified example of what I'm doing:
So, the question is, should
:first-of-type work with data attribute values like this?Thanks!
