Fork me on GitHub
#untangled
<
2017-05-29
>
claudiu11:05:13

@tony.kay The om-css snapshot seems awesome. Surprised by the fast fix in om-next multi-method. but then saw that you fixed it 🙂

claudiu11:05:58

Seems to work in advanced mode apart from a really strange issue. 😞

claudiu11:05:19

If in the server I add a om.next then it affects the cljs advanced build for some reason 😞

claudiu11:05:54

The easiest way to replicate it is just to add [om.next :as om] in the require of the (ns user of user.clj

claudiu11:05:34

then when i do lein clean && lein cljsbuild once release I get the html without the class just <li> and the <style id="my-css"></style> is empty.

tony.kay15:05:38

@claudiu you mean in Ssr?

claudiu16:05:33

not really. Just adding it in dev.clj messes with the clojurescript build.

claudiu16:05:52

Managed to replicate it in the cookbook example, just by importing in .clj om next. If I remove the import the production build works just fine.

timovanderkamp16:05:56

Hey @claudiu and other Untangled/om-css users out there. I am currently working with the new version of this library and i'm facing some issues that i would like to improve. Would love to hear your thoughts and suggestions on this. First of, local css-rules and global css-rules are now separated by different protocols. But there are some cases where you would want to add additional css-rules to a classname, for example when you are using an another external component. So what i basically mean is that you have some cases where you want to prevent a keyword to be localised even though it is defined somewhere nested in your local-rules. My suggestion would be to prefix those keywords with a $. Second, multiple classnames now have to be defined like this: {:className (str classA " " classB " " (when condition classC))} I think it would be nice to have a helper function that takes any amount of classnames and merges them together. {:className (css/merge-classnames classA classB (when condition classC))}

tony.kay17:05:51

@claudiu that is rather strange…no ideas on my end

tony.kay17:05:16

that should not even be on the classpath during a release build

tony.kay17:05:12

@timovanderkamp I agree with (1). On (2): I like the idea (though ppl have prob written their own, it won’t hurt to include one). The name is the primary thing. Something shorter would be nice.

tony.kay17:05:01

what abt & and such?

tony.kay17:05:25

what other garden -> CSS notations should we be worried about?

tony.kay17:05:13

probably should go through the docs and explore what we’re going to run into. Or, we can add them as people run into them. The latter makes the library a bit more frustrating.

timovanderkamp17:05:20

I've looked at the garden selectors to check what would be a problem atm. At a quick look it would not be possible yet to use the CSS combiners and the special selector &.

timovanderkamp17:05:33

The CSS combiners are +, - and >

timovanderkamp17:05:31

[:.a {..} [:+.b {..}]] -> .a { .. } .a + .b { .. }

timovanderkamp17:05:29

What doesn't work atm is that [:+.b {..}] won't be transformed to [:+.namespace_Component__b {..}], as it should be

timovanderkamp17:05:38

same goes for all the CSS combiners

tony.kay17:05:12

so as you discover those, throw up issues on github

tony.kay17:05:38

glad to merge PRs as rapidly as anyone wants to address them

tony.kay17:05:33

I’m betting one generalization that scans for the set of these like #{"+" ">" ...} will get us a long way

timovanderkamp17:05:47

yes exactly, we are currently only transforming keywords that start with :.