Block Styles
1,528 sites
Security covered
The Block Styles module allows you to add custom styles to block wrappers without needing to override the block's theme file. It provides a style selector within the block configuration form, making it easy to apply pre-defined styles or create your own for blocks.
Using the Styles API Module allows to set different styles for block wrapper theme.
This module affects only block.html.twig, and not the way content is displayed.
Classes could be added to block wrapper, even if block theme has not been overwritten.
The styles selector is shown at the end of the block configuration form.
Installation
- Download and install Styles API Module.
- Download and install Block Styles.
- Enter to the block configuration form and select styles.
Included styles
- Clean wrapper (cero marckup)
- Bootstrsap styles on submodule (modal, dropdown, card and collapse)
For developers
New layouts can be defined using *.themes.yml with type=block. Please refer to Styles API Module for detailed information.