-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Style standardisation #14
Conversation
Uhm... in general i like the approach but:
Right now, in Yoga, we resolved to use a single file for the shared styles (e.g.: the navigation bar style) and, inside the |
One thing that's not clear to me is: why should we do this: Tempura.applyStyle(Style.Layer.redView, to: self.backgroundView) instead of simply doing this: Style.Layer.redView(self.backgroundView) ? |
RC
well, I think it is suboptimal, but you can still do it. There is nothing that prevents you not use Sketc
You can create multiple extensions of Text, I don't think it is a problem (it will become when/if we will automate the process) @madbat I prefer it too, but it is quite hard / impossible to implement. If you want to try let me know |
@bolismauro 🤔 maybe I'm missing something. This example function from the README extension Style.Layer {
static func redView(_ view: UIView) {
view.backgroundColor = .red
}
} shouldn't it just be possible to use it like this inside my view's style method: Style.Layer.redView(self.backgroundView) ? |
@madbat It is indeed possible, one reason not to do that is to have a Tempura function that is always invoked when styling, in case we want to do something later on... |
Remove ApplyStyle
|
Changes:
Please check the readme carefully as it contains most of the work.
This PR doesn't provide any automation process from Sketch, but it creates a foundation for it. The idea is to start adopting this style and be ready for the automation step we will face in the (hopefully near) future