css selector by custom attribute

QuestionsCategory: wordpresscss selector by custom attribute
Brandon9 asked 6 years ago

How can i write a css selector by the element’s custom attribute?
html:
<div data-custom=”some=value”></div>

1 Answers
Best Answer
karl answered 6 years ago

You can use the custom attribute selector. in your case, you can do this in your stylesheet:

div[data-custom=”some=value”]{
}