From 4356c6901926273b0fa351173205eafd1d1fbc7e Mon Sep 17 00:00:00 2001 From: Ans Date: Fri, 29 Mar 2024 17:37:31 -0400 Subject: [PATCH] Create `m-full-width-media` modifier and caption element --- cfgov/unprocessed/css/molecules/full-width-media.less | 9 +++++++++ cfgov/v1/jinja2/v1/includes/molecules/content-image.html | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/cfgov/unprocessed/css/molecules/full-width-media.less b/cfgov/unprocessed/css/molecules/full-width-media.less index 4017bed81b..3a61062643 100644 --- a/cfgov/unprocessed/css/molecules/full-width-media.less +++ b/cfgov/unprocessed/css/molecules/full-width-media.less @@ -1,5 +1,14 @@ .m-full-width-media { + &__bottom-rule { + padding-bottom: unit(@grid_gutter-width / 2 / @base-font-size-px, rem); + border-bottom: 1px solid @horizontal-rule; + } + &_image { display: block; } + + &_caption { + margin-top: unit(15px / @base-font-size-px, rem); + } } diff --git a/cfgov/v1/jinja2/v1/includes/molecules/content-image.html b/cfgov/v1/jinja2/v1/includes/molecules/content-image.html index 3c41030495..6bab303235 100644 --- a/cfgov/v1/jinja2/v1/includes/molecules/content-image.html +++ b/cfgov/v1/jinja2/v1/includes/molecules/content-image.html @@ -38,12 +38,12 @@ {%- if value.image_width == 'full' -%}
+ {{- ' m-full-width-media__bottom-rule' if value.is_bottom_rule else '' }}"> {{ image_alt_value(value.image) }} {%- if value.text %} -
+
{{ value.text | safe }}
{%- endif %}