Originate / OriginateTheme

OriginateTheme is a lightweight user interface theming framework.
MIT License
5 stars 0 forks source link

Function and Variable Syntax [RFC - 2.0.0] #10

Open pkluz opened 7 years ago

pkluz commented 7 years ago

The proposed theme.json syntax to support (a set of predefined) functions and variables would require the syntax to change as follows:

{
    "colors": {
        "primary": "FF0000",
        "secondary": "00FF00"
    },
    "fonts": {
        "default": {
            "name": "HelveticaNeue",
            "size": 14.0
        }
    },
    "components": {
        "navBar": {
            "colors": {
                "tint": $(primary),
                "background": $(secondary.brighten(0.2)),
                "text": "FFFFFF"
            },
            "fonts": {
                "title": $(default.size(20))
            }
        }
    }
}

Request for Comment @allewun @rweindl @rhenetz