Improve Hajk client custom styling ability by adding CSS anchor classes #1481
sweco-semara
started this conversation in
Ideas
Replies: 1 comment 4 replies
-
@Hallbergs @jacobwod Hi core developers, I am ready to start an issue/small PR for this idea if you don't see an obvious downside or have another suggested approach? While beta-testing of Hajk theming for the Swedish Geotechnical Instititute we came across this pretty simple work-around for global theme styles "bleeding into" unrelated components like the infoclick plug-in. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sharing an idea/proposition for improving core Hajk MUI-styling capability, using standard MUI JSON profiles. E.g. for adapting Hajk to a specific municipality's or corporate entity's graphical profile according to a communication department's guidelines.
✅ Hajk client already has native MUI5 theming support (using new-client/public/customTheme.json) according to the rules of Material UI v5 Theming
❌ Lack of documentation hints. Propose to add a brief summary e.g. first bullet / summary from this idea, if accepted, to main README
❌ Lack of component/plug-in specific CSS styling classes, making it difficult for a graphic designer to adapt some elements. E.g. a global theming of MUI grid with it's CSS classes
MuiGrid-item
under aMuiGrid-root
will also affect the arrows in infoclick modals (with number of GetFeatureInfo hits >= 2). Propose to add non-intrusive CSS styling "theming hint classes" per component, e.g.hajk-modal-info
to the infoclick plug-in. This new optional class enables a differentiating in theming/styling although the same MUI Grid component structure is used in multiple other places in Hajk client.This last proposed simple change could potentially act as a starting point for gradually improving all client plug-ins (and core client) elements with similar theming hint classes. This proposal is fully backwards compatible since introducing new optional CSS-classes will not break existing CSS hierarchy or existing custom styles.
If idea is accepted, I would create an issue and contribute a small PR against develop for evaluating the implementation starting point. It does not have to be a global decision / i.e. made mandatory to enforce this idea to all Hajk plug-ins, there is no downside of leaving it at the starting point for future inspiration only and potentially gradually improving theming capability over time.
See example custom theme:
Beta Was this translation helpful? Give feedback.
All reactions