openmastery / semantic-ui-theme

Theme editor and manager for the Semantic-UI framework
MIT License
15 stars 0 forks source link

Create YAML to JS compiler for Semantic-UI components #3

Open p3nGu1nZz opened 6 years ago

p3nGu1nZz commented 6 years ago

Overview

we need a compiler that will take a base .yml file containing theme style fields and functions and create a JS module that can be loaded into a webpage. The JS module will consist of:

Specification

The compiled module's renderer will dynamically create a new stylesheet <link/> into the <head/> of the document with the renderer. The renderer will create new rules in the stylesheet by injecting the rules with the injector. Rules can dynamically be set by calling an update function within the renderer.