Skip to content
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

Mixins #34

Open
BernardGatt opened this issue Sep 28, 2016 · 0 comments
Open

Mixins #34

BernardGatt opened this issue Sep 28, 2016 · 0 comments
Milestone

Comments

@BernardGatt
Copy link

BernardGatt commented Sep 28, 2016

Mixins will give the ability to anyone styling the application to save and reuse styles, a mixin is created by treating an alias as a normal Class that requires styling, StyleKit will then associate all the styles contained in the block to that alias. Mixins would then be used by setting the mixins property that will be available on every component and passing in one or more aliases.

{
    "@primaryColor": "#641E16",
    "@secondaryColor": "#17202A",
    "@tertiaryColor": "#424949",
    "@textFieldStyle": {
        "font": "HelveticaNeue-Light:25.0",
        "color": "@primaryColor",
        "border": 0.5,
        "cornerRadius": 8.0
    },
    "MyApp.LoginView": {
        "MyApp.MainTextField": {
            "mixins": ["@textFieldStyle"],
            "backgroundColor": "@secondaryColor"
        },
        "MyApp.SecondaryTextField": {
            "mixins": ["@textFieldStyle"],
            "backgroundColor": "@tertiaryColor"
        }
    }
}
@BernardGatt BernardGatt added this to the 1.0 milestone Sep 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant