Skip to content

Commit

Permalink
Stop using mobile_top_margin in call for evidence
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
andysellick committed Dec 20, 2024
1 parent b5b88ed commit 8949526
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions app/views/content_items/call_for_evidence.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
} %>
<div class="call-for-evidence-outcome-detail">
<%= render 'govuk_publishing_components/components/govspeak', {
direction: page_text_direction,
Expand All @@ -61,7 +64,7 @@
<header>
<%= 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"),
} %>
</header>
Expand Down Expand Up @@ -108,11 +111,13 @@

<div class="call-for-evidence-description">
<%= 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 %>

Expand All @@ -124,8 +129,10 @@

<% if @content_item.ways_to_respond? %>
<div id="ways-to-respond" class="call-for-evidence-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 %>
Expand Down

0 comments on commit 8949526

Please sign in to comment.