Skip to content

Commit

Permalink
Stop using mobile_top_margin in consultations
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 be80bb9 commit 93dc46a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/views/content_items/_attachments_list.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<section id="<%= title.parameterize %>">
<%= render 'govuk_publishing_components/components/heading',
text: title,
mobile_top_margin: true
margin_bottom: 4
%>
<% add_gem_component_stylesheet("details") %>
<% attachments_for_components.each do |details| %>
Expand Down
11 changes: 7 additions & 4 deletions app/views/content_items/consultation.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@
title: t("consultation.download_outcome"),
attachments_for_components: @content_item.final_outcome_attachments_for_components
%>
<%= render 'govuk_publishing_components/components/heading', text: t("consultation.detail_of_outcome"), mobile_top_margin: true %>
<%= render 'govuk_publishing_components/components/heading', {
text: t("consultation.detail_of_outcome"),
margin_bottom: 4,
} %>
<div class="consultation-outcome-detail">
<%= render 'govuk_publishing_components/components/govspeak', {
direction: page_text_direction,
Expand All @@ -73,7 +76,7 @@
%>
<% if @content_item.public_feedback_detail %>
<%= render 'govuk_publishing_components/components/heading', {
mobile_top_margin: true,
margin_bottom: 4,
text: t("consultation.detail_of_feedback_received"),
} %>
<div class="consultation-feedback">
Expand All @@ -92,7 +95,7 @@
<%= render 'govuk_publishing_components/components/heading', {
heading_level: 2,
id: "original-consultation-title",
mobile_top_margin: true,
margin_bottom: 4,
text: t("consultation.original_consultation"),
} %>
</header>
Expand Down Expand Up @@ -136,7 +139,7 @@

<div class="consultation-description">
<%= render 'govuk_publishing_components/components/heading', {
mobile_top_margin: true,
margin_bottom: 4,
text: t("consultation.description"),
} %>

Expand Down

0 comments on commit 93dc46a

Please sign in to comment.