I mean, that seems ugly to me, but... Makes intuitive sense and is fine actually? Is HTML a rich language in which to embed stuff like this? No. Does this clearly get the point across? Yes.
[Edit: this should've actually been attached to the GP comment. I agree with the parent.]
Isn't that the whole point of hypermedia frameworks like Datastar and HTMX? It's to extend the declarativeness of HTML.
If you don't like the syntax, that's your preference. But I'm curious to hear why this is "wrong". Since that's a more objective thing, we can discuss it
hasanhaja|4 months ago
If you don't like the syntax, that's your preference. But I'm curious to hear why this is "wrong". Since that's a more objective thing, we can discuss it
troupo|4 months ago
You have a DSL based on data-* attributes
But then some attributes get this weird syntax-ish extension
Then some of those attributes accept a Datastar expressions DSL: https://data-star.dev/guide/datastar_expressions
So you can have
Which is just bad design