Closed atsepkov closed 7 years ago
I come from the web world as well which I why I probably love Classy so much. However, layout with iOS is just fundamentally different and in my opinion layout belongs defined as autolayout constraints in your xib/storyboard, not in your stylesheet. That being said, there is this project https://github.com/olegam/ClassyLiveLayout that you may be interested in.
Coming from css/js world, I keep wishing that we'd have a bit more power in defining dimensions via Classy. I was able to define absolute dimensions via
bounds
property, which is great. But it doesn't look like relative dimensions are supported. Absolute dimensions, as shown below, are great when I want to restrict the view to exact size:More often than not, however, I want to define dimensions relative to the parent container, or passed-in frame:
Currently, I'm very happy with being able to style my views almost completely through
cas
file, but having to hardcode all the logic for computing child frame, and margins/padding prevents me from relying exclusively on Classy for styling.