weavejester / hiccup

Fast library for rendering HTML in Clojure
http://weavejester.github.io/hiccup
Eclipse Public License 1.0
2.68k stars 174 forks source link

Simpler element naming #108

Closed pharcosyle closed 2 years ago

pharcosyle commented 9 years ago

(This isn't so much an issue as a small feature request.) Can we get class-only element specification, like garden and lots of other html/css preprocessors allow? Just allowing

[:div.jumbotron ...]

to be specified by

[:.jumbotron ...]

would make the hiccup's html piece of the puzzle match up more nicely with the css piece.

weavejester commented 9 years ago

Well, under the current reader documentation, keywords cannot contain ., which is why historically this syntax hasn't been supported.

However, this syntax is supported by edn, so it might be worth raising this on the clojure-dev mailing list. The current reader documentation isn't particularly well written, and it would be nice to get some clarification, so I'll post and see what happens.

pharcosyle commented 9 years ago

Ahhh interesting. Thanks for looking into this!

weavejester commented 9 years ago

It turns out there's a JIRA issue (CLJ-1527) for clarifying the reader documentation.