Customize Heretto Portal Styling
Overwriting the default Heretto Portal style enables you to customize its look and feel.
If you want to maintain your CSS code on a server external to Heretto CCMS, you can add the following code to the config.json
file to call and apply the CSS.
"stylesheets": ["your-server-url/custom.css"]
-
Prepare your sitemap for portal customizations.
-
If needed, change the default starter theme. See Starter Themes Reference.
Your Content Library may contain multiple sitemaps associated with different portal instances such as production (public) or staging (internal) instances. We recommend keeping the sitemaps associated with production (public) Heretto Portal instances on distinct branches different than the default “master” branch.
Any configuration, style, behavior, or content changes that you make to the sitemaps associated with your Heretto Portal instances are instantaneous.
Keep the following guidelines in mind when styling your portal:
- Avoid using negative values for
margin
andpadding
properties. - Avoid using percent values. Try using
flex
orflex-basis
properties. - If you use percent values, the value should a base 8 root percent.
For example, you can use:
100%
,50%
,25%
,6.25%
,3.125%
. - Use
flex
for general layout properties. - Use
grid
for specific use cases like lists and items that need to be fixed to a certain number.
Verify the configuration changes by opening your portal in a web browser.
Get CSS Selectors for Heretto Portal Styling
The DITA elements are rendered as HTML elements with classes that you can use to define CSS selectors.