Git Product home page Git Product logo

Comments (6)

dhleong avatar dhleong commented on May 28, 2024

Yes! You can compose multiple styles. I just updated the readme to clarify that you can either provide a single name or a collection of names.

from spade.

ouvanous avatar ouvanous commented on May 28, 2024

Hi,
I have some trouble using composes with a collection.
Using something like :composes [(style1) (style2)] give an "Invalid argument to :composes key:"
I did try to use :composes (seq [(style1) (style2)]) but then the name of the style that use compose is split as a collection

I think the problem come from here :

(->> (if (seq? composed)
           (into composed style-name)
           [composed style-name])

Using :composes (seq [(style1) (style2)]) if should be:
(into composed [style-name])
Or using :composes [(style1) (style2)]
it should be (flatten [composed style-name])

Or maybe I simply miss something here

What I do for now is :composes (clojure.string/join " " [(style1) (style2)] and it works nicely
Thanks for spade!
Samuel

from spade.

dhleong avatar dhleong commented on May 28, 2024

@ouvanous That does look like a bug! (conj composed style-name) should also work. I'll try to find time to fix this, but PR is welcome in the meantime ;)

from spade.

dhleong avatar dhleong commented on May 28, 2024

It's possible that the macro checking :composes expects a list and is mad about the vector, so may also need to tweak something there 🤔

from spade.

dhleong avatar dhleong commented on May 28, 2024

@ouvanous I just pushed a fix; should be available in the 1.2.0-SNAPSHOT. Let me know if that resolves the issue for you!

from spade.

dhleong avatar dhleong commented on May 28, 2024

I went ahead and published a stable 1.1.1 with the fix

from spade.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.