Last active
June 14, 2016 10:44
-
-
Save nesterone/59bad137e6f344376917232b5154840d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Configuration | |
cssClass.config.guard = 'jr'; | |
//use cases | |
cssClass({ | |
module: "button" | |
}); | |
// -> 'jr-mButton jr' | |
cssClass({ | |
module: "button", | |
modifiers: ["small","default"], //What if no 'module' field | |
}) | |
// -> 'jr-mButton jr-mButtonSmall jr-mButtonDefault jr' | |
cssClass({ | |
module: "button", | |
modifiers: ["small","default"], | |
icons: ["copy"], | |
states: ["pressed"], | |
hooks: ["MyJavaScriptMarker"] | |
}); | |
// -> 'jr-mButton jr-mButtonSmall jr-mButtonDefault jr-copy jr-isPressed jr-jMyJavaScriptMarker jr' | |
//Child and Child Variations | |
cssClass({ | |
module: { | |
parent: "table", | |
name: "row" | |
} | |
}); | |
cssClass({ | |
module: { | |
parent: "table", | |
name: "row" | |
} | |
}); | |
// -> jr-mTable-row jr | |
cssClass({ | |
module: { | |
parent: "table", | |
name: "cell", | |
module: { | |
name: "date" | |
} | |
} | |
}); | |
// -> jr-mTable-cell-date jr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment