default.css - Colors and sizes¶
The default.css file overrides CSS variables that control the overall appearance of WebGIS Portal and WebGIS API, especially colors and sizes.
Location¶
The file is stored in the content/styles/<company> subdirectory of the respective application.
If the file is intended for a specific portal page, it is stored in content/portals/<portal-page-id> and named map-default.css there.
// For the company
api/
└── wwwroot/
└── content/
└── styles/
└── <company>/
└── default.css
// For a specific portal page
portal/
└── wwwroot/
└── content/
└── portals/
└── <portal-page-id>/
└── map-default.css
<company> corresponds to the value of the company key in portal.config.
<portal-page-id> corresponds to the id value of the respective portal page URL name.
Note
The /<company>/ and /<portal-page-id>/ directories are not overwritten during an update.
All changes inside them are preserved.
If the following key is set in portal.config, a portal author can enter the content of default.css directly in the portal without having to store the file physically in the repository:
<add key="portal-custom-content-rootpath" value="..../webgis-repository/portal-page-content" />
Brand variables (recommended adjustment)¶
Usually it is enough to adjust only the brand variables to make the application appear in your corporate colors. All other colors are derived from them.
.webgis-container, body {
/* Primary color - the most important customization value */
--webgis-brand-primary: #82C828;
/* Optional: light variant (otherwise calculated automatically) */
/* --webgis-brand-primary-light: #d9f0d0; */
/* Optional: dark variant (otherwise calculated automatically) */
/* Not used in default.css, but can be used for custom adjustments */
/* --webgis-brand-primary-dark: #3a7a20; */
}
Tip
In most cases, it is enough to set only --webgis-brand-primary.
The light and dark variants are calculated automatically from the primary color unless they are explicitly overridden.
Examples¶
Concrete implementation examples can be found under default.css - Examples.
All available CSS variables¶
All variables are defined within the selector .webgis-container, body { ... }.
Brand¶
Variable |
Default value |
Description |
|---|---|---|
|
|
Primary application color. |
|
(calculated) |
Light variant of the primary color for backgrounds. |
|
(calculated) |
Dark variant of the primary color for text and accents. |
Surfaces¶
Variable |
Default value |
Description |
|---|---|---|
|
|
Default background of panels and dialogs. |
|
|
Background in the hover state. |
|
|
Sunken background, for example for input fields. |
|
|
Color of divider lines. |
|
|
Background of section headers. |
|
|
Background for disabled elements. |
|
|
Background for read-only fields. |
|
|
Inverted background (dark mode). |
|
|
Strongly inverted background. |
Text¶
Variable |
Default value |
Description |
|---|---|---|
|
|
Default text color. |
|
|
Text color for selected elements. |
|
|
Color for labels. |
|
|
Color for headings in panels. |
|
|
Text color for disabled elements. |
|
|
Text color on a dark background. |
|
|
Text color on a highlighted background. |
Font sizes¶
Variable |
Default value |
Description |
|---|---|---|
|
|
Font size of the labels under tool icons. |
Borders¶
Variable |
Default value |
Description |
|---|---|---|
|
|
Default border color. |
|
|
Subtle border color. |
|
|
Border color for info notes. |
|
|
Border color for error states. |
|
|
Border color for changed values. |
|
|
Border width for selected list entries. |
|
|
Border width of buttons. |
|
|
Corner radius of buttons. |
Overlays¶
Variable |
Default value |
Description |
|---|---|---|
|
|
Dark background overlay, for example for modal dialogs. |
|
|
Lighter variant of the overlay. |
|
|
Light, semi-transparent overlay. |
|
|
Muted overlay for subtle highlighting. |
Status colors¶
Variable |
Default value |
Description |
|---|---|---|
|
|
Background for error messages. |
|
|
Strong error background. |
|
|
Background for warning messages. |
|
|
Background for highlighted content. |
|
|
Background for informational notes. |
|
|
Background for success messages. |
Spacing and sizes¶
Variable |
Default value |
Description |
|---|---|---|
|
|
Size of the tool icons in the toolbar. |
|
|
Padding of a tool entry. |
|
|
Margin between tool entries. |
|
|
Padding of the TOC title (collapsed). |
|
|
Margin of the TOC title (collapsed). |
|
|
Padding of the TOC title (expanded). |
|
|
Margin of the TOC title (expanded). |
|
|
Padding of a TOC entry. |
|
|
Margin of a TOC entry. |
|
|
Font size of TOC entries. |
|
|
Size of the legend symbols in the TOC. |
|
|
Padding of buttons. |
|
|
Font size of buttons. |
|
|
Padding of input fields. |
|
|
Font size of input fields. |