Add a background gradient to any container element (layout, teaser, div, etc.) by adding the u-bolt-bg-gradient
utility class to it.
This is a container with the .u-bolt-bg-gradient
class and .t-bolt-navy
theme class.
This is a container with the .u-bolt-bg-gradient
class and .t-bolt-teal
theme class.
This is a container with the .u-bolt-bg-gradient
class and .t-bolt-yellow
theme class.
{% set layout_item %}
{% include '@bolt-layouts-layout/layout-item.twig' with {
content: '<p>This is a layout item with a gradient background.</p>',
} only %}
{% endset %}
{% include '@bolt-layouts-layout/layout.twig' with {
attributes: {
class: [
'u-bolt-bg-gradient',
'u-bolt-padding-medium',
't-bolt-navy',
],
},
content: layout_item,
} only %}
<bolt-layout class="u-bolt-bg-gradient u-bolt-padding-medium t-bolt-navy">
<bolt-layout-item>
This is a layout item with a gradient background.
</bolt-layout-item>
</bolt-layout>