lajlev
lajlev

Reputation: 772

Is there a way to write data attributes in zen coding?

I use data attributes more every day, and I really miss a simple way to add a data attribute while using zen coding. I mean I can add inline style (not that I ever use it)

div[style=color:red;]

why can't I add data attribute like

div[data-color=pink]

Any work arounds?

Upvotes: 2

Views: 1296

Answers (2)

wener
wener

Reputation: 7740

I use div[data-color=pink] and it works.

Both div[data-color="pink"] and div[data-color='pink'] don't.

Upvotes: 0

rinkashimikito
rinkashimikito

Reputation: 26

you can:

div[data-color='pink']

Upvotes: 1

Related Questions