CSS Helper Classes
CSS helper classes are intended to be used by developers to decrease duplicated style rules and increase development speed for new widgets. These are classes that can be appended to your html/dijit element to apply a certain style rule. The helper can be found at bundles/base/templates/common/common.css and bundles/base/themes/common/common.css depending whether it is a template or a theme helper.
General Layout Helper
Description |
Disables scrollbars for the element where this class is applied to. Use carefully, because the content inside might get hidden. |
Applies to |
all html elements. |
Description |
disables text selection for the element, this class is applied to. |
Applies to |
all html elements. |
Example |
|
Description |
Sets the padding to 0 for all four edges. Useful if you put ContentPanes have a default-padding of 8px set by dojo. When using nested LayoutContainer (such as ContentPane and BorderContainer) the padding might get doubled up and destroy the widget’s layout. To solve this problem, use this helper class. |
Applies to |
all html elements. |
Example |
|
Description |
Sets the padding to 0 for all top and bottom edge. |
Applies to |
all html elements. |
Description |
Sets the padding to 0 for left and right edge. |
Applies to |
all html elements. |
Description |
Sets a default padding of 8px on each site of the element the class is applied to |
Applies to |
all html elements. |
Description |
Sets a default margin of 8px on each site of the element the class is applied to |
Applies to |
all block or inline-block html elements. |
Description |
Sets width and height to 100% each and removes padding as well as margin. |
Applies to |
all html elements that are block or inline-block elements (such as div). |
Description |
Sets width or height separately to 100%. |
Applies to |
all block or inline-block html elements inside elements that have a size defined. |
Description |
Sets the overflow property to auto or hidden to allow or disallow scrolling when child elements are to large. |
Applies to |
all block or inline-block html elements. |
Description |
Replaces overflowing text by "…" A width for the element must be defined. If text inside is wider, it is shortened by "…". |
Applies to |
all html elements. Remeber that you can set the width only for block or inline-block elements. |
Example |
|
Description |
Makes a given Text printed in bold |
Applies to |
all html elements that do not have font weight set sepcifically from somewhere else |
Example |
|
Description |
Aligns text and other inline or inline-block child elements to the right. Use with care. Otherwise code and layout get too connected. |
Applies to |
all html elements. |
Example |
|
Description |
Aligns text and other inline or inline-block child elements to center. Use with care. Otherwise code and layout get too connected. |
Applies to |
all html elements. |
Example |
|
Description |
Rotates element clockwise by 90, 180 or 270 degree. |
Applies to |
all html elements. |
Example |
|
Description |
Element is flipped horizontally or vertically. |
Applies to |
all html elements. |
Example |
|
Description |
The theme’s default background color is applied |
Applies to |
all html elements. |
Description |
The theme’s default text color is applied |
Applies to |
all html elements. |
Description |
Applies the theme’s highlight-color as font color to any native html element |
Applies to |
all html elements. |
Responsive display of elements
Elements placed inside windows (for example Widgets) can be hidden depending on the window’s size or orientation.
Extra-Small | Small | Medium | Large | Extra-Large | |
---|---|---|---|---|---|
|
HIDDEN |
VISIBLE |
VISIBLE |
VISIBLE |
VISIBLE |
|
HIDDEN |
HIDDEN |
VISIBLE |
VISIBLE |
VISIBLE |
|
HIDDEN |
HIDDEN |
HIDDEN |
VISIBLE |
VISIBLE |
|
HIDDEN |
HIDDEN |
HIDDEN |
HIDDEN |
VISIBLE |
|
HIDDEN |
HIDDEN |
HIDDEN |
HIDDEN |
HIDDEN |
|
HIDDEN |
HIDDEN |
HIDDEN |
HIDDEN |
HIDDEN |
|
VISIBLE |
HIDDEN |
HIDDEN |
HIDDEN |
HIDDEN |
|
VISIBLE |
VISIBLE |
HIDDEN |
HIDDEN |
HIDDEN |
|
VISIBLE |
VISIBLE |
VISIBLE |
HIDDEN |
HIDDEN |
|
VISIBLE |
VISIBLE |
VISIBLE |
VISIBLE |
HIDDEN |
Landscape | Portrait | |
---|---|---|
|
HIDDEN |
VISIBLE |
|
VISIBLE |
HIDDEN |
Icon Helper Classes
Icon helper classes can be used to set a certain icon at an element.
Overview: Available Icon Classes
<!-- Example for a dijitButtonNode with iconClass -->
<div data-dojo-type="dijit/form/Button" data-dojo-props="iconClass:'icon-default'"></div>
<!-- Examplefor an html element that is used to create an icon -->
<span class="icon-default"></span>
Advanced Helper Classes
Description |
To create a button with extra visual weight to identify the primary action in a set of buttons, use |
Applies to |
|
Example |
|
Description |
Often a loading indicator is needed. As developer you can create a div an attach the class "ctLoading" to make it a spinning loading icon. As soon as loading has finished detach the class or the whole div. But it is important that the element the class is applied to has no width or height (for example width:20; height:22px). Otherwise the spinner does not spin around its center. |
Applies to |
all html elements that have no explicit width or height set |
Example |
|
There are further helper classes available that are explained together with live samples at
-
Building Layout with CSS Flexbox:
https://demos.conterra.de/mapapps/resources/apps/css-flexbox
-
Building responsive Layout Grids in map.apps Windows:
https://demos.conterra.de/mapapps/resources/apps/css-responsive-grid
-
Show and hide elements based on the size of the surrounding map.apps Window:
https://demos.conterra.de/mapapps/resources/apps/css-responsive-display