Skip to content
Snippets Groups Projects
Commit 506aa9f4 authored by Martin Leblanc's avatar Martin Leblanc
Browse files

ISTWCMS-5747: css for block spacing

parent 63557aed
No related branches found
No related tags found
1 merge request!34ISTWCMS-5747: migrate block
@forward 'block/block';
@forward 'carousel/carousel';
@forward 'content/content';
@forward 'footer/footer';
......
// @file
// Styles for Block.
.block {
margin-bottom: var(--grid-gap);
}
// disable margin for layout builder blocks
.block--provider-layout-builder {
margin-bottom: 0;
}
{% set classes = [
'block l-block',
modifier ? modifier: '',
attributes ? attributes.class
]|join(' ')|trim %}
{% set title_classes = [
'block__title l-block__title',
title_attributes ? title_attributes.class
]|join(' ')|trim %}
{% set content_classes = [
'block__content l-block__content',
content_attributes ? content_attributes.class
]|join(' ')|trim %}
{% if block_wrapper %}
<div class="{{ classes }}" {{ attributes ? attributes|without('class','id') }}>
{% endif %}
{% if constrain %}
<div class="{{ constrain }}">
{% endif %}
{{ title_prefix }}
{% if label %}
<{{ label_element ?: 'h2' }} class="{{ title_classes }}" {{ title_attributes ? title_attributes|without('class') }}>{{ label }}</{{ label_element ?: 'h2' }}>
{% endif %}
{{ title_suffix }}
{% if content_wrapper %}
<div class="{{ content_classes }}" {{ content_attributes ? content_attributes|without('class') }}>
{% endif %}
{% block content %}
{{ content }}
{% endblock %}
{% if content_wrapper %}
</div>
{% endif %}
{% if constrain %}
</div>
{% endif %}
{% if block_wrapper %}
</div>
{% endif %}
---
block_wrapper: true
constrain: ''
title_prefix: ''
label_element: ''
label: 'Block title'
title_suffix: ''
content_wrapper: true
content: |-
<p>Donec id elit non mi porta gravida at eget metus. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Nulla vitae elit libero, a pharetra augue. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Donec id elit non mi porta gravida at eget metus.</p>
......@@ -8,7 +8,7 @@
<div class="uw-image__wrapper {{ image_class }}">
{% if image.type == 'full' %}
{{ image.image.img_element['#uri'] }}
{% include '@components/responsive-image/responsive-image.twig' with {
'sources': image.image.sources,
'img_element': image.image.img_element['#uri'],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment