0

How do I style a span by its data-scribe.

eg. in my html there is:

<span data-scribe="element:verified_badge">✔</span>

How could I add CSS styling to this specific span?

jsb
  • 51
  • 1
  • 4

1 Answers1

6

You could use the attribute selector and do something as simple as:

span[data-scribe] {
    color:green;
}

or more specific like:

span[data-scribe="element:verified_badge"] {
    color:green;
}

jsFiddle example

j08691
  • 197,815
  • 30
  • 248
  • 265