Comments (6)
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.
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.
@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.
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.
@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.
I went ahead and published a stable 1.1.1 with the fix
from spade.
Related Issues (9)
- Support composition
- Generate appropriate arglist meta for functions
- Trouble with Media Queries HOT 5
- Unable to generate style names when compiled under `:simple` optimizations HOT 5
- Further optimize for the expected case of "pure" style functions HOT 1
- Support for Custom DOM Injection Targets HOT 6
- Binding Forms Incompatible with defclass HOT 1
- A little glitch in the defglobal macro HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spade.