Customize Heretto Portal Styling
Overwriting the default Heretto Portal style enables you to customize its look and feel.
Tip: The following procedure assumes that you will be updating and maintaining your CSS customizations directly in Heretto CCMS.
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.
JSON
"stylesheets": ["your-server-url/custom.css"]
-
Prepare your sitemap for portal customizations.
-
If needed, change the default starter theme. See Starter Themes Reference.
Keep the following guidelines in mind when styling your portal:
- Avoid using negative values for
marginandpaddingproperties. - Avoid using percent values. Try using
flexorflex-basisproperties. - 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
flexfor general layout properties. - Use
gridfor specific use cases like lists and items that need to be fixed to a certain number.
Prepare the configuration file
Add the configuration file to your sitemap
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.
In Google Chrome™ or Mozilla Firefox, access the Heretto Portal instance that you want to style.