-
Notifications
You must be signed in to change notification settings - Fork 177
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
Allow keywords in style maps #140
Conversation
Reagent allows keywords as CSS attribute values such as {:style {:color :red}} Hiccup already supports this for top-level DOM node attributes. This commit extends this feature to style maps.
I should mention the current behavior is to generate |
@pesterhazy To match Reagent's convention, should integers be rendered as pixels by default? For example: (str (html [:div {:style {:margin 10}}])) To: <div style="margin:10px;"></div> Note 1: this might be due to React's rendering engine and not Reagent's: Note 2: unitless values for incorrect attributes (such as Note 3: some attributes do expect unitless values (such as |
Yes, I think so
…On Fri 26. Jul 2019 at 09:32, David Perrenoud ***@***.***> wrote:
@pesterhazy <https://github.com/pesterhazy> To match Reagent's
convention, should integers be rendered as pixels by default?
For example:
(str (html [:div {:style {:margin 10}}]))
To:
<div style="margin:10px;"></div>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#140?email_source=notifications&email_token=AAAZ6WET5JLEEHR5OPJJJGLQBKR7BA5CNFSM4C4P3QPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD23YFKA#issuecomment-515343016>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAZ6WBNXKCSI6ZHQMNRAPTQBKR7BANCNFSM4C4P3QPA>
.
|
@weavejester Is there a reason not to merge this? This would be very helpful for me with Oz. |
This PR seems to have fallen through the cracks. It should be fine to merge, but the commit message body should be removed, as I think the subject is sufficient explanation. |
Thanks @weavejester! Do you need @pesterhazy to edit the commit history before it gets merged then? |
Hey @weavejester! Could I take this? I would like to take this to the finish line. Edit: if I can take this up, I will make a new PR and add @pesterhazy as co-author |
Sure. |
Closed by #194 |
Reagent allows keywords as CSS attribute values such as
{:style {:color :red}}
Hiccup already supports this for top-level DOM node attributes. This commit
extends this feature to style maps.