Set CSS
Last updated
Last updated
Set CSS
is a that allows you to add and/or remove from any element on the page or form.
Refer to the block for dynamically generated content.
The block comes in two modes which are discussed below.
The Mode 1 version of the Set CSS block consists of (from top to bottom):
The Mode 2 version of the Set CSS block consists of (from top to bottom):
The image below shows an example of the Mode 1 version where the CSS class bg-info
is being added and the class bg-dark
is being removed.
NOTE: Using a CSS selector, you can operate on multiple elements that match the criteria specified by the selector. See the references below for more information:
Element: to choose the element you want to add/remove the CSS classes for.
Add Classes: configuration setting to specify classes (multiple classes can be separated by a space) to be added. Can be empty if you do not want to add any CSS classes.
Remove Classes: configuration setting to specify classes (multiple classes can be separated by a space) to be removed. Can be empty if you do not want to remove any CSS classes.
Element: that accepts either a value in the form of a or an value The Element block comes pre-attached for your convenience but can be removed and customized.
Add Classes: that accepts a value containing the classes (multiple classes can be separated by a space) to be added. Can be empty if you do not want to add any CSS classes.
Remove Classes: that accepts a value containing the classes (multiple classes can be separated by a space) to be removed. Can be empty if you do not want to remove any CSS classes.
In the next example we see a Mode 2 version where the Element value parameter is attached to a Text block containing a that selects the same element. The Add Classes and Remove Classes value parameters are attached to Variable Value blocks.