yonaskolb / Stylist

Define UI styles for iOS apps in a hot-reloadable yaml or json file
MIT License
295 stars 18 forks source link

Enhancements proposal #3

Closed garsdle closed 6 years ago

garsdle commented 6 years ago

First of all I love Stylist! You've really made something great here, especially with that live reload. I've got some feedback so far:

I'm curious what your thoughts are on these.

yonaskolb commented 6 years ago

Hey @garsdle, glad you're liking it. Thanks for the feedback!

  1. Yeah, we already have a styles: Array property, so automatically splitting styles: String by , will be easy. I've thought about adding that already 👍
  2. I'm not sure how this would work? Interface builder calls prepareForInterfaceBuilder for @IBDesignable views, but we wouldn't have a theme loaded at that point. What I can do is make a StyleableView which is an @IBDesignable UIView subclass so you can set style in the property inspector instead of runtime attributes.
  3. The styles used to be stored in a dictionary, but with the addition of classes and view hierarchies this wasn't a simple mapping of style names anymore, as you may have a selector like UIStackView.section main UIButton.primary

I welcome any more suggestions!

yonaskolb commented 6 years ago

StyleableView added in #4

yonaskolb commented 6 years ago

Comma separated styles added in #6

yonaskolb commented 6 years ago

Closing this for now. Feel free to open any more specific issues