Add base16 theme and inline it so that it can be swapped for css vars #24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Haha okay this is obviously very hacky and not actually ready to merge but I figured I would open just incase it is useful to someone or if you wanted me to actually clean it up. Basically what I did is add a base16 theme which uses simple hex codes. These can then later be swapped out for CSS vars when we are rendering the colors.
Also I realized that lighter will always request themes from your website when deployed because the JSON files do not get included in the nextjs bundle. The only way I could figure out how to get it to be inlined was by directly including it, this actually speeds up rendering a lot (~200ms) and so is probably something worth doing, although it will obviously make the bundle a little bigger. Here I obviously just hardcoded it to the base16 theme since thats the only one I use which would need to be changed.
The output of this can be used like: