I have an HTML structure looks like this. Some of the element has a dynamic attribute name starts with data-ref-
followed by some random hex code.
Is there away to target the attribute name partically?
[data-ref-*='group'] {
color: red;
}
<div data-ref-15af36e1="group">foo</div>
<div data-ref-63b361af="group">bar</div>
<div data-ref-c836eea7="item">baz</div>
In this example I want the foo
and bar
to be red. Is it possible?