Created
March 16, 2017 19:48
-
-
Save gmac/45bc517e7a19088124688e45ac5f0b4c to your computer and use it in GitHub Desktop.
Notes for theme editor talk
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
// THEME | |
// Get plain variable text: | |
theme.getVar('color_breaker_fg') | |
// Get rendered variable value: | |
theme.getVarValue('color_breaker_fg') | |
// Compile mapped field dependencies: | |
theme.getDependencyGraph() | |
// Get variable dependents and ancestors: | |
theme.getVarDependencies('color_body') | |
theme.getVarAncestors('color_breaker_fg') | |
// See the current diff that we're tracking from source: | |
theme.getDiff() | |
JSON.stringify( theme.getDiff() ) | |
// USAGE | |
// Get variables that apply to a rule: | |
theme_usage.getVarsForRule('.c-global-header') | |
// Get rules that apply to a variable: | |
theme_usage.getRulesForVar('color_link') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment