wegue-oss / wegue

Template and components for webmapping applications with OpenLayers and Vue.js
BSD 2-Clause "Simplified" License
93 stars 41 forks source link

Allow custom theme properties #404

Closed chrismayer closed 2 weeks ago

chrismayer commented 3 weeks ago

This allows to define custom theme properties in the app-config JSON, like

  "colorTheme": {
    "dark": false,
    "themes": {
      "light": {
        "primary": "#FFFFFF",
        "onprimary": "#000000",
        "secondary": "#B9B9B9",
        "cmcustom": "#000074"
      },
      "dark": {
        "primary": "#FF0000",
        "secondary": "#FFCC80",
        "onprimary": "#00FF00",
        "cmcustom": "#FF0074"
      }
    }
  },

Before the theme properties were limited to the default ones of Vuetify. According to Vuetify2 theme docs it is totally OK to define custom properties and very useful IMHO. The custom properties are fully treated as the default ones and the derivatives like -lighten1 or -darken5 will be created.

chrismayer commented 2 weeks ago

Thanks for your feedback @sronveaux. I updated the theming documentation with your suggestions.

Going to merge now. Failing tests seem to be unrelated, since they were green before without any substantial change and they also fail for #405. Investigation should be done separately...