#Lustre html data attributes

1 messages ยท Page 1 of 1 (latest)

junior basalt
#

Not sure if I missed it in the documentation but I haven't seem a way to set data attributes on html elements. I'd like to use them to conditionally style html elements with Tailwind. Let me know if there's a preferred different way. I'd also be willing to submit a PR that adds support for html data attributes.

vernal lintel
#
attribute("data-thing", "123")
#

isn't it that?

past valley
#

it is yeah

vernal lintel
#

I'm good at Lustre

past valley
#

a PR adding attribute.data(key: String, value: String) would be nice

junior basalt
#

Oh thank you both ๐Ÿ™ I'll look into submitting one ๐Ÿ™‚

junior basalt
#

@past valley Here's a draft PR for that. I'd just need to know where to add a test case for it and I think it should be good to be merged ๐Ÿ˜„

past valley
#

add a test case for it

#

dont be silly

#

clearly we have not spoken much