Skip to content

Context with theme has problems loading Catalog #12776 - #12792

Merged
offtherailz merged 2 commits into
geosolutions-it:masterfrom
rowheat02:context-catalogue-css
Aug 14, 2026
Merged

offtherailz merged 2 commits into
geosolutions-it:masterfrom
rowheat02:context-catalogue-css

Conversation

@rowheat02

Copy link
Copy Markdown
Contributor

Description

Common CSS classes from the context theme were overriding MapStore component styles. This affected components like:

  • Catalog
  • CRS Selector

Some common classnames were affected, like(.checkbox, .ms-flex-box)
Fixed by scoping the affected styles under .ms2 so MapStore component styles take priority over the common theme styles.
This solution is a best fit rather than others build level fix for CSS.

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Bugfix

Issue

What is the current behavior?

#12776

What is the new behavior?

In the dark theme context, Catalog shows no CSS issues.
image

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • Yes, and I documented them in migration notes
  • No

Other useful information

@rowheat02 rowheat02 added this to the 2026.02.01 milestone Aug 13, 2026
@rowheat02
rowheat02 requested a review from offtherailz August 13, 2026 07:49
@cla-bot cla-bot Bot added the CLA Ready label Aug 13, 2026
@rowheat02 rowheat02 linked an issue Aug 13, 2026 that may be closed by this pull request
1 task done

@offtherailz offtherailz left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to be solved at build phase .ms2 is specific to the core project but not in most of the downstream ones
I think also less should use a similar loader to the css one https://github.com/geosolutions-it/MapStore2/blob/master/build/buildConfig.js#L203-L255

Make sure that this works for projects too after this change.

@rowheat02

Copy link
Copy Markdown
Contributor Author

@offtherailz
Prefix regular less files also at build time with cssPrefix after reverting the last change. This prevents later loaded CSS from overriding component styles.

image

Also tested on the downstream project.

@rowheat02
rowheat02 requested a review from offtherailz August 13, 2026 10:10
@offtherailz
offtherailz merged commit b7f846a into geosolutions-it:master Aug 14, 2026
16 checks passed
@offtherailz

Copy link
Copy Markdown
Member

Successfully created backport PR for 2026.02.xx:

offtherailz added a commit that referenced this pull request Aug 14, 2026
* Fix component styles overridden by context theme

* prefixing for normal less file too

(cherry picked from commit b7f846a)

Co-authored-by: RowHeat <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Context with theme has problems loading Catalog

2 participants