electric icon indicating copy to clipboard operation
electric copied to clipboard

`hyperfiddle.electric-dom2/props` reverses class order

Open milelo opened this issue 1 year ago • 4 comments

If I call:

(hyperfiddle.electric-dom2/props {:class "a b c"})

the dom shows: class="c b a".

milelo avatar Aug 24 '24 11:08 milelo

Is it damaging something?

dustingetz avatar Aug 24 '24 11:08 dustingetz

Potentially. If two classes have a conflicting style property for example color, the latter one takes precedence.

milelo avatar Aug 25 '24 16:08 milelo

Thanks, we accept the bug. The root cause is that e/for mounts branches concurrently – they are racing. It is potentially straightforward to guarantee a mount ordering and we have been considering it.

dustingetz avatar Aug 26 '24 12:08 dustingetz

In Semantic UI, class names are order-dependent so e.g. (dom/props {:class "ui right aligned"}) renders to DOM as "aligned right ui", so I have to reverse the order to get text alignment working.

theronic avatar Dec 05 '24 09:12 theronic