typestyle / csx

Utility functions for TypeStyle
https://typestyle.github.io
MIT License
102 stars 14 forks source link

Create a generic list() function for css list properties #13

Closed notoriousb1t closed 7 years ago

notoriousb1t commented 7 years ago

Example

cssRule('body', {
  backgroundImage: list(
    linearGradient(/* */), 
    linearGradient(/* */)
  )
})
notoriousb1t commented 7 years ago

@basarat I'm on the fence about this. Options:

style({
  backgroundImage: csx.backgroundImage().and().and()
})
basarat commented 7 years ago

even if you do it at a property level you would still need to add support at the type level. I might be wrong here :rose:

notoriousb1t commented 7 years ago

That is true, to create property specific helpers we would have to be even more specific. Hmm...

notoriousb1t commented 7 years ago

Added a naive implementation in ef8b46d3220bd0d0d4794c22797ea93f5008b4c3