-
-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use standard keys for :class and :for #5
Comments
Patch with Tests welcome ... |
I think this would also mean relacing all of those attributes with "dash" versions: |
And what about events? |
Good point. My main concern was alignment with hiccup conventions, so I'm preparing a pull request against your updated code. Should have it done tomorrow. |
Hi Asmala, thanks for the patch! I applied it an made a minor change. I Thanks Roman. |
Happy to help! I'd like too see the common parts of the hiccup family libraries pulled into one cross-compileable library, so this was just scratching my own itch. 😉 |
Given that the HTML attributes get passed via
sablono.compiler/compile-attrs
, is there a reason to stick to the React convention of using:htmlFor
and:className
, instead of the standard:for
and:class
? These could be easily rewritten on the fly withincompile-attr
to follow React conventions.Sticking to the standard key names would allow sablono to more readily share code with hiccup and related libraries (see also this hiccup issue), and would seem more intuitive to the average Clojure user. What do you think?
Something like this:
The text was updated successfully, but these errors were encountered: