From 89495266548ee6b0d4a4796cef3f95b9168d5a12 Mon Sep 17 00:00:00 2001 From: Andy Sellick Date: Fri, 20 Dec 2024 13:55:25 +0000 Subject: [PATCH] Stop using mobile_top_margin in call for evidence - headings have this unusual behaviour in consultation pages where the mobile top margin is much larger - this is slightly odd and inconsistent behaviour, so we're removing this option from the heading component and applying custom spacing in these pages instead using existing component options --- .../content_items/call_for_evidence.html.erb | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/app/views/content_items/call_for_evidence.html.erb b/app/views/content_items/call_for_evidence.html.erb index b786a8cb6..755c3f860 100644 --- a/app/views/content_items/call_for_evidence.html.erb +++ b/app/views/content_items/call_for_evidence.html.erb @@ -47,7 +47,10 @@ attachments_for_components: @content_item.outcome_documents %> - <%= render 'govuk_publishing_components/components/heading', text: t("call_for_evidence.detail_of_outcome"), mobile_top_margin: true %> + <%= render 'govuk_publishing_components/components/heading', { + text: t("call_for_evidence.detail_of_outcome"), + margin_bottom: 4, + } %>
<%= render 'govuk_publishing_components/components/govspeak', { direction: page_text_direction, @@ -61,7 +64,7 @@
<%= render 'govuk_publishing_components/components/heading', { heading_level: 2, - mobile_top_margin: true, + margin_bottom: 4, text: t("call_for_evidence.original_call_for_evidence"), } %>
@@ -108,11 +111,13 @@
<%= render 'govuk_publishing_components/components/heading', { - mobile_top_margin: true, + margin_bottom: 4, text: t("call_for_evidence.description"), } %> - <%= render 'govuk_publishing_components/components/govspeak', {} do %> + <%= render 'govuk_publishing_components/components/govspeak', { + margin_bottom: 8, + } do %> <%= raw(@content_item.govspeak_body[:content]) %> <% end %> @@ -124,8 +129,10 @@ <% if @content_item.ways_to_respond? %>
- <%= render 'govuk_publishing_components/components/heading', text: t("call_for_evidence.ways_to_respond"), mobile_top_margin: true %> - + <%= render 'govuk_publishing_components/components/heading', { + text: t("call_for_evidence.ways_to_respond"), + margin_bottom: 4, + } %> <%= render 'govuk_publishing_components/components/govspeak', { direction: page_text_direction, } do %>