bazed-editor / bazed

The baz editor
Apache License 2.0
26 stars 3 forks source link

Implement some sort of User Styles / User Config #62

Open druskus20 opened 1 year ago

druskus20 commented 1 year ago

At the moment we have a Theme object that we pass around to our components. Its properties are then used as inline styles in the DOM elements. This clearly does not scale as the number of config options grows over time.

 <div
    style:position="absolute"
    style:height="{height}px"
    style:top="0"
    style:background={theme.editor_background}
    style:width="{theme.text_offset}px"
    style:left="{gutter_width}px"
  />

I think we could instead have a global styles.css file that is either exposed to the user or generated from its user settings, which would clean up the component code a lot.