okor/justice

Share color variables between SCSS and JS

Closed this issue · 4 comments

okor commented

DRY and should make theming very easy.

You might want to use inline styles and JS variables. Easier to theme for consumers too.

okor commented

I'm definitely open to this idea of inline styles. I think I would probably approach this as "overrides" and default to the static compiled theme.

But I still think it would be cool to use a YAML file or similar to share default colors between Sass and JS during compilation.

okor commented

@necolas Done in https://github.com/okor/justice/commits/themes (requires editing src/theme.json). Not entirely happy with solution it's in a branch until I can decide what to do with it. Maybe check out that branch and see what you think. Feel free to clean up any glaring ugliness in a PR.

okor commented

Consolidating similar issues here: #28