AEM 6.4 has reached the end of extended support and this documentation is no longer updated. For further details, see our technical support periods. Find the supported versions here.
Knowledge of CSS and the LESS framework.
The article lists publicly available css classes of adaptive forms. You can leverage these classes to style various components of an adaptive form. The styling of authoring components, such as dialogs and status bars that display warnings are beyond the scope of this article. Use these styling constructs to create styles (using CSS or Less) only when you are unable to style components using theme editor.
The LESS framework simplifies the use case to customize styles in adaptive forms. The framework lets you define styles using a set of variables and functions (mixins). The LESS framework helps reduce the size of the bundled code and increases its reusability.
You can customize adaptive form styles in the following ways:
You can change the theme of an adaptive form to ensure that its appearance is consistent with the web pages where the adaptive form is embedded.
Changes in the overall appearance of the adaptive form using CSS properties are typically part of theme changes. Major changes to the lo ``ok and feel of the adaptive form, such as changes in the layout and placement of components are not considered theme changes.
Based on the bootstrap, the following set of CSS properties define the theme of a web page:
Currently, LESS variables are defined only for these properties of the various elements in an adaptive form.
You can make changes to the appearance, layout, positioning, and visibility of elements. To achieve this task, create or update your custom .css files to include the styling constructs listed in this article.
To apply a style to an adaptive form, open the adaptive form in for editing, open properties of adaptive form conatiner, specify the path of custom CSS File in the basic tab. Defaut styling constructs of the adaptive form and overridden with the constructs listed in the custom .css file.
The components discussed in this article have their predefined CSS classes. You can edit the variables to modify the styles in the CSS classes. Alternatively, you can rewrite the entire class. This section describes the classes within components and styles that you can modify using variables.
A container is the top-level component. Other panels and fields lie under the container component.
CSS class |
|
Variables Description |
Variables Description |
|
Background color of the container |
|
Padding for the container |
|
Margin for the container |
|
Font color for the container |
Adaptive forms include various types of fields. Each field has a unique class name, which is the name of the field. The field also has a common class name guideFieldNode
.
Fields include labels, widgets, Help description (both Long and Short description), and Field Help icons (question mark).
CSS class |
|
Variables |
Description |
|
Padding for the field |
|
Font color of the error message of field |
|
Font size of the error message of field |
The HTML element label used for the field includes the classes left or top depending on whether the label is at the top or left.
CSS class |
|
Variables |
Description |
|
Font color for the field label |
|
Font size for the field label |
|
CSS line height property for the field label |
|
CSS font weight property for the field label |
|
Margin for the field label |
The CSS rules for the label are applied using the guideFieldLabel label. If you are an author, override this rule to make your custom changes visible.
Depending on their type, widgets also include classes. Commonly, widgets include the guideFieldWidget
class. The widgets that ship with HTML normally use the standard HTML element input and select. The styling is done accordingly. You cannot style a custom widget by changing the variables.
CSS class |
|
Variables |
Description |
|
Background color for the widgets (Doesn't work for check box and radio button) |
|
Border color for the widgets |
|
Border size for the widgets |
|
Border radius for the widgets |
|
Border type for the widgets |
|
Focus type for widget borders |
|
Consolidated border style of widgets |
|
Color of the text inside the widget |
|
Size of the text inside the widget |
|
CSS lineheight property for the widget |
|
CSS padding property for the widget |
|
Border color when the widget is in focus |
|
Border color of the widget for the mandatory fields |
|
Background color of the widget for the mandatory fields |
|
Background color for the widget when the field is disabled |
|
Font color for the widget when the field is disabled |
|
Border Color for the widget when the field is disabled |
|
Height of the widget (Doesn't work for checkbox and radio button) |
|
Height for check box and radio button. |
|
Maximum height for a multi-select dropdown |
The styling for focused, mandatory, and disabled fields is restricted using variables. However, you can change it by overriding the styles. Restriction using variables is provided mainly to keep the number of variables in check. The restriction can be relaxed if the appearance of a field drastically changes because it is in any of the states discussed earlier.
An author can specify the Help content in the fields using Short and Long description components. Both components have a common class .guideHelpDescription
and another class .long
/ .short
, depending on the type of description. The Help content is enclosed in a paragraph element to override the styling of the description. The Help description (both long and short) is modified using variables starting with widgetshelp, as mentioned in following table:
Variables |
Description |
|
Background color of the widgets' long Help |
|
Border color of the widgets' long Help |
|
Left indicator border color of the widgets' long Help |
|
Background color of the widgets' short Help |
|
Font color of the widgets' short Help |
|
Background color of the widgets' short tool tip Help |
|
Font color of the widgets' short tool tip Help |
The Terms and Conditions (TnC
) widget lets you specify terms and conditions. You can customize the widget using the variables described in the following table.
Variables |
Description |
tnc-unvisited |
Font color of unvisited tnc link. |
tnc-visited |
Font color of visited tnc link. |
Buttons are also widgets. However, their styling is slightly different from the widgets. In adaptive forms, any of the following constitutes a button:
HTML code for button:
<button type="button" >
<span class="iconButtonicon"></
span>
<span class="iconButtonlabel"></
span>
</button>
CSS Class |
Description |
|
Provides icons for button |
|
Styles button label/caption |
Variables |
Description |
|
Border size for the buttons |
|
Border type |
|
CSS padding property for the button |
|
Font size for the button |
|
Background color for the button |
|
Font color of the button |
|
Border color of the button |
|
Padding for the large buttons (buttons with class .buttonlarge) |
|
Font size for large buttons |
|
Padding for the small buttons (buttons with class .buttonsmall) |
|
Font size for small buttons |
|
Background color for informative buttons (buttons with class .buttoninformative) |
|
Font color for informative buttons |
|
Border color for informative buttons |
|
Background color for warning styled buttons (buttons with class .buttonwarning) |
|
Font color for warning styled buttons |
|
Border color for warning styled buttons |
|
Background color for alert buttons (buttons with class .buttonalert) |
|
Font color for alert buttons |
|
Border color for alert buttons |
For the widgets, a questionMark is displayed when an author adds a long description in the Help content. The default icon provided in bootstrap is used. To use a custom icon, you can customize the bootstrap icons.
CSS class |
|
Variables |
Description |
|
Color of the icon |
|
Color of the icon when mouse is hovered over it |
You can change the color theme for header and body rows in a table by using the following variables.
Variables |
Description |
|
Background color for the header row. The default value is |
|
Background color for the odd body row. The default value is |
|
Background color for the even body row. The default value is |
The File Attachment widget of adaptive forms lets you upload files. You can also customize the widget using the variables.
Variables |
Description |
|
Padding for the files displayed in the widget |
|
Background color for the file item |
|
Border color for the top border |
|
Font color for the file item |
|
Color for the Preview icon (Bootstrap icon) in the widget |
|
Height of comment for the file item |
There are four types of navigator tabs. These include tabs on the left, top, in the wizard and accordion. Each navigator has a different class.
Naviagator |
CSS class |
|
.accordion-navigators |
|
.tab-navigators-vertical |
|
.tab-navigators |
|
.wizard-navigators |
The following is the HTML code for the tab navigator element is (similar to the bootstrap tabs):
<li>
tab title
</li>
Accordion navigator is an exception, it has following barebone
structure:
<div class="accordion.navigators">
<div>
<div class = "guideHeader">
<a>
<span class = "guideSummary" ></span>
........................... repeatable buttons, if the repeatable configuration is set ................................
<div class = "repeatableButtons">
<button name="Add" class="Add"/>
<button name="Remove" class="Remove"/>
</div>
</a>
</div>
................................ panel content ..................................
</div>
</div>
You can change the styling of the navigator using CSS rules that select the elements using descendant selectors. For example, to add a text decoration style to the anchor tag:
Tab navigator on top:
.tab-navigators
li a {
text-decoration:
underline;
}
Tab navigator on left:
.tab-navigators-vertical
li a {
text-decoration:
underline;
}
Accordion navigator:
.accordion-navigators .guideHeader a .guideSummary {
text-decoration:
underline;
}
Wizard navigator:
.wizard-navigators
li a {
text-decoration:
underline;
}
Additionally, there are classes to style tab navigators (both left and top) based on whether they have nested/child/sub navigators.
CSS Class |
Description |
|
Tab navigators (left and top) that have nested/child/sub navigators |
|
Tab navigators (left and top) that don't have nested/child/sub navigators |
The guideNavIcon class provides a default icon to tab navigators (both left and top) and wizard navigators.
CSS class |
|
You can change the icon for a particular navigator by providing a CSS class on the panel in authoring, form example <CLASS_NAME>. You add a <CLASS_NAME>_nav for the icon of the navigator.
Variables |
Description |
Tab Navigators |
|
|
Background color for the entire tab navigator |
|
Background color for the tab |
|
Font color for the tab |
|
Background color for the tab on hover |
|
Font color for the tab on hover |
|
Background color when the panel is in focus (active) |
|
Font color when the panel is in focus |
|
Background color when the completion expression of the panel returns true |
|
Font color when the completion expression of the panel returns true |
|
Background color when the panel has been in focus once but the completion expression returns false |
|
Font color when the panel has been in focus once but the completion expression returns false |
|
Border color for the tab |
|
Font size for the tab |
|
Padding for the tab |
|
Margin for the tab |
|
Margin for the vertical tabs |
|
Border size for the tabs |
|
Minimum height of the tabs |
|
Indentation for the nested tabs |
Wizard Navigators |
|
|
Background color for entire wizard navigator |
|
Background Color for the wizard |
|
Font color for the wizard |
|
Background color when the panel is in focus (active) |
|
Font color when the panel is in focus (focused) |
|
Background color when the completion expression of the panel returns true |
|
Font color when the completion expression of the panel returns true |
|
Background color when the panel has been in focus once but completion expression returns false |
|
Font color when the panel has been focused once but completion expression returns false |
|
Color for the wizard |
|
Font size for the wizard |
|
Padding for the wizard |
|
Border size for the wizard |
|
Border color of the wizard navigator bullet (prefixing the caption/label) |
|
Background color of the wizard navigator progress bar |
|
Fill color for the progress bar |
Accordion Navigators |
|
|
Padding for accordion |
A Panel includes an optional toolbar and its content.
CSS class |
|
Variables |
Description |
|
Background color for the panel |
|
Font size for the panel text |
|
Font color for the panel text |
|
Padding inside the panel |
|
Font size of panel's description |
|
Padding of panel's description |
|
Background color for the panel's help |
|
Indicator border color for the panel's help |
The panel node is divided into navigators and content. There
is no separate styling component for the content. The variables described are applied on navigator as well as content.
*The topmost panel (RootPanel) doesn’t have this class.
These variables influence the header bar that is visible on a mobile device or small screen devices that contain panel title and next and back navigators.
CSS class |
|
Variables |
Description |
|
Background color for the header bar |
|
Font color for the text inside header bar |
|
Padding for header bar |
These variables influence the Scroll indicator, which is an orange arrow that appears on a mobile device or small screen devices. A Scroll indicator indicates that there is content beyond the visible part of the screen. You can scroll down to see it. When you hit the end of content, the arrow disappears.
CSS class |
|
Variables |
Description |
|
Fixed position of scrollindicator from bottom |
|
Fixed position of scrollindicator from right |
|
Width of scrollindicator |
|
Height of scrollindicator |
These variables in the following table influence the mobile fixed toolbar layout.
CSS class |
|
Variables |
Description |
|
Fixed position of toolbar, on mobile device, from bottom |
|
Fixed position of toolbar, on mobile device, from top |
|
Fixed position of toolbar, on mobile device, from left |
|
Fixed position of toolbar, on mobile device, from right |
|
Fixed position of toolbar's buttons' icon, from top |
|
Width of toolbar's buttons' icon on mobile device |
|
Height of toolbar's buttons' icon on mobile device |
|
Background color of toolbar on mobile device |