Skip to content

Changing theme CSS #10434

Description

@whittaker007

Description

I'm trying to set up a local installation of Mapstore and make some tweaks to the theme CSS.

I have followed the Styling and Theming guide at https://docs.mapstore.geosolutionsgroup.com/en/latest/developer-guide/customize-theme and none of my changes are showing up.

Documentation section involved

  • Developer Guide

Other useful information

I have made a new theme folder in the html root and copied the dark theme as a starter. So:

themes/custom/theme.less:

@import '../../web/client/themes/default/theme.less';
@import 'variables.less';

themes/custom/variables.less:
clone of web/client/themes/dark/variables.less

As per the docs I have also modified:
build/prod-webpack.config.js
build/webpack.config.js
project/standard/templates/prod-webpack.config.js
project/standard/templates/webpack.config.js

each with the following change:

-    themeEntries,
+    {
+       "themes/default": path.join(__dirname, "themes", "custom", "theme.less")
+    },

I also modified web/client/product/appConfig.js:

+                theme: {
+                    selectedTheme: {
+                        id: custom
+                    }
                 }

and finally web/client/themes/index.js:

module.exports = [{
     id: "default"
 }, {
     id: "dark"
+}, {
+    id: "custom"
 }];

What am I missing?

Metadata

Metadata

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions