On Thursday, March 16, 2017 at 6:55:44 PM UTC+1, rgde...@gmail.com wrote:
> Thanks for pointing me to your library and to the other thread, I'll take a 
> look!
> 
> In general, I disagree that a string-based solution is strictly worse than a 
> map-based solution, since using strings can help the library remain 
> evergreen. If the library can inject strings that use "real" CSS with little 
> or no parsing, it means that it'll be more likely to support new CSS syntax 
> without needing any updates.
> 
> It also means that current CSS syntax weirdnesses such as pseudoclasses 
> (:hover, etc) and queries (@media, @supports) work how you'd expected them to.

It makes more sense to use strings in JS since you can't achieve what I'm doing 
without more work there. JS doesn't have keywords so it can't differentiate 
between properties and selectors in objects as easily.

You will still use strings for selectors so media queries or pseudoclasses just 
work, property values default to strings as well.

But the most important part is: It is all just Clojure code. Your Clojure tools 
just work. You can call functions, you can merge styles from different parts. 
Good luck doing this with strings.

FWIW styled-components adds 20KB (min, gzip'd) since it requires a CSS parser 
at runtime. It's hard to measure shadow.markup due to :advanced but it much 
less than that, probably 10%.

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at https://groups.google.com/group/clojurescript.

Reply via email to