-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Labels
Milestone
Description
In values we're proposing the introduction of a set of reserved keywords that will serve as functions, by version 1 there will be a number of functions available:
ImageURL
{
"@logoImageURL": "https://avatars1.githubusercontent.com/u/17726261",
"MyApp.LoginView": {
"MyApp.LogoView": {
"backgroundImage": "ImageURL(@logoImageURL)"
}
}
}Gradient
{
"@primaryColor": "#641E16",
"@secondaryColor": "#78281F",
"MyApp.LoginView": {
"backgroundColor": "Gradient(style: 'Horizontal', locations: [0.9, 1.0], colors: [@primaryColor, @secondaryColor])"
}
}Alpha
{
"@primaryColor": "#641E16",
"MyApp.LoginView": {
"UILabel": {
"tintColor": "@primaryColor"
},
"UIButton": {
"backgroundColor": "Alpha(@primaryColor, 80)"
}
}
}In addition to these functions StyleKit will also provide a function registry so developers can add their own custom functions.