Skip to content

Commit

Permalink
Remove responsive-margin-top
Browse files Browse the repository at this point in the history
Use 'govuk-main-wrapper' class on the main element to introduce spacing
  • Loading branch information
JamesCGDS committed Feb 14, 2025
1 parent 3b47a99 commit 7b64270
Show file tree
Hide file tree
Showing 31 changed files with 37 additions and 39 deletions.
2 changes: 1 addition & 1 deletion app/views/content_items/_body_with_related_links.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<% content_for :simple_header, true %>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds responsive-top-margin">
<div class="govuk-grid-column-two-thirds">
<%= render 'govuk_publishing_components/components/heading',
text: @content_item.title,
heading_level: 1,
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/call_for_evidence.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<%= render 'shared/email_subscribe_unsubscribe_flash', { title: @content_item.heading_and_context[:title] } %>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds responsive-top-margin">
<div class="govuk-grid-column-two-thirds">
<%= render 'govuk_publishing_components/components/heading', @content_item.heading_and_context %>
</div>
<%= render 'shared/translations' %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/case_study.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<% end %>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds responsive-top-margin">
<div class="govuk-grid-column-two-thirds">
<%= render 'govuk_publishing_components/components/heading', @content_item.heading_and_context %>
</div>
<%= render 'shared/translations' %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/consultation.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<%= render 'shared/email_subscribe_unsubscribe_flash', { title: @content_item.heading_and_context[:title] } %>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds responsive-top-margin">
<div class="govuk-grid-column-two-thirds">
<%= render 'govuk_publishing_components/components/heading', @content_item.heading_and_context %>
</div>
<%= render 'shared/translations' %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/contact.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<% content_for :simple_header, true %>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds responsive-top-margin">
<div class="govuk-grid-column-two-thirds">
<%= render 'govuk_publishing_components/components/heading', @content_item.heading_and_context %>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<div class="<%= @content_item.organisation_brand_class %>">
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds responsive-top-margin">
<div class="govuk-grid-column-two-thirds">
<%= render 'govuk_publishing_components/components/heading',
text: @content_item.title,
heading_level: 1,
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/detailed_guide.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<%= render 'shared/email_subscribe_unsubscribe_flash', { title: @content_item.heading_and_context[:title] } %>

<div class="govuk-grid-row gem-print-columns-none">
<div class="govuk-grid-column-two-thirds responsive-top-margin">
<div class="govuk-grid-column-two-thirds">
<%= render 'govuk_publishing_components/components/heading', @content_item.heading_and_context %>
</div>
<%= render 'shared/translations' %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/document_collection.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<%= render 'shared/email_subscribe_unsubscribe_flash', { title: @content_item.heading_and_context[:title] } %>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds responsive-top-margin">
<div class="govuk-grid-column-two-thirds">
<%= render 'govuk_publishing_components/components/heading',
context: t("content_item.schema_name.#{@content_item.document_type}", count: 1),
text: @content_item.title,
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/fatality_notice.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<% end %>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds responsive-top-margin">
<div class="govuk-grid-column-two-thirds">
<%= render 'govuk_publishing_components/components/heading', @content_item.heading_and_context %>
</div>
<%= render 'shared/translations' %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/field_of_operation.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="govuk-width-container">
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds responsive-top-margin">
<div class="govuk-grid-column-two-thirds">
<%= render "govuk_publishing_components/components/heading", @content_item.heading_and_context %>
</div>
<div class="govuk-grid-column-one-third govuk-!-margin-top-8 govuk-!-margin-bottom-8">
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/fields_of_operation.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds responsive-top-margin">
<div class="govuk-grid-column-two-thirds">
<%= render 'govuk_publishing_components/components/heading', @content_item.heading_and_context %>

<div class="govuk-grid-row">
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/gone.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds responsive-top-margin">
<div class="govuk-grid-column-two-thirds">
<%= render "govuk_publishing_components/components/heading", {
text: t("gone.title"),
heading_level: 1,
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/guide.html+print.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<% end %>

<div class="govuk-grid-row gem-print-columns-none" id="guide-print">
<div class="govuk-grid-column-two-thirds responsive-top-margin">
<div class="govuk-grid-column-two-thirds">
<%= render 'govuk_publishing_components/components/heading', {
text: @content_item.title,
heading_level: 1,
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/guide.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<% content_for :simple_header, true %>

<div class="govuk-grid-row gem-print-columns-none">
<div class="govuk-grid-column-two-thirds responsive-top-margin">
<div class="govuk-grid-column-two-thirds">
<% if show_contents_list_ab_test? %>
<%= render 'govuk_publishing_components/components/heading', {
text: @content_item.content_title,
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/guide_single.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<% content_for :simple_header, true %>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds responsive-top-margin">
<div class="govuk-grid-column-two-thirds">
<%= render 'govuk_publishing_components/components/heading', {
text: @content_item.content_title,
heading_level: 1,
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/how_government_works.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="govuk-width-container">
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds responsive-top-margin">
<div class="govuk-grid-column-two-thirds">
<%= render "govuk_publishing_components/components/heading", {
text: "How government works",
heading_level: 1,
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/news_article.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<% end %>

<div class="govuk-grid-row gem-print-columns-none">
<div class="govuk-grid-column-two-thirds responsive-top-margin">
<div class="govuk-grid-column-two-thirds">
<%= render 'govuk_publishing_components/components/heading', @content_item.heading_and_context %>
</div>
<%= render 'shared/translations' %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/publication.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<%= render 'shared/email_subscribe_unsubscribe_flash', { title: @content_item.title } %>

<div class="govuk-grid-row gem-print-columns-none">
<div class="govuk-grid-column-two-thirds responsive-top-margin">
<div class="govuk-grid-column-two-thirds">
<%= render 'govuk_publishing_components/components/heading',
context: t("content_item.schema_name.#{@content_item.document_type}", count: 1),
context_locale: t_locale_fallback("content_item.schema_name.#{@content_item.document_type}", count: 1),
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/service_manual_guide.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<!-- Page title and contact -->
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<div class="app-page-header responsive-top-margin">
<div class="app-page-header">
<%= render "govuk_publishing_components/components/heading", {
context: @content_item.category_title,
text: @content_item.title,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div class="govuk-width-container">
<!-- Page title and contact -->
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds responsive-top-margin">
<div class="govuk-grid-column-two-thirds">
<div class="app-page-header govuk-!-margin-top-3 govuk-!-margin-bottom-3">
<%= render "govuk_publishing_components/components/heading", {
text: @content_item.title,
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/service_manual_topic.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<% end %>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds responsive-top-margin">
<div class="govuk-grid-column-two-thirds">
<%= render "govuk_publishing_components/components/heading", {
text: @content_item.title,
heading_level: 1,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds responsive-top-margin">
<div class="govuk-grid-column-two-thirds">
<%= render 'govuk_publishing_components/components/heading',
text: @content_item.title,
heading_level: 1,
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/specialist_document.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<% content_for :simple_header, true %>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds responsive-top-margin">
<div class="govuk-grid-column-two-thirds">
<%= render 'govuk_publishing_components/components/heading', @content_item.heading_and_context %>
</div>
<%= render 'shared/translations' %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/speech.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<% end %>

<div class="govuk-grid-row gem-print-columns-none">
<div class="govuk-grid-column-two-thirds responsive-top-margin">
<div class="govuk-grid-column-two-thirds">
<%= render 'govuk_publishing_components/components/heading', @content_item.heading_and_context %>
</div>
<%= render 'shared/translations' %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/statistical_data_set.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<% end %>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds responsive-top-margin">
<div class="govuk-grid-column-two-thirds">
<%= render 'govuk_publishing_components/components/heading',
context: t("content_item.schema_name.#{@content_item.document_type}", count: 1),
text: @content_item.title,
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/statistics_announcement.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<% end %>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds responsive-top-margin">
<div class="govuk-grid-column-two-thirds">
<%= render 'govuk_publishing_components/components/heading', @content_item.heading_and_context %>
<%= render 'govuk_publishing_components/components/lead_paragraph', text: @content_item.description %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/working_group.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<% end %>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds responsive-top-margin">
<div class="govuk-grid-column-two-thirds">
<%= render 'govuk_publishing_components/components/heading', @content_item.heading_and_context %>
</div>
<%= render 'shared/translations' %>
Expand Down
16 changes: 7 additions & 9 deletions app/views/development/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@
</head>
<body>
<div id="wrapper">
<main class="govspeak" id="content">
<div class="responsive-top-margin">
<%= render 'govuk_publishing_components/components/heading',
text: 'government-frontend',
heading_level: 1,
font_size: "xl",
margin_bottom: 8
%>
</div>
<main class="govspeak" id="content govuk-main-wrapper">
<%= render 'govuk_publishing_components/components/heading',
text: 'government-frontend',
heading_level: 1,
font_size: "xl",
margin_bottom: 8
%>

<% html = capture do %>
<p>
Expand Down
2 changes: 1 addition & 1 deletion app/views/histories/history.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<header class="govuk-width-container">
<div class="govuk-grid-row">
<div class="govuk-grid-column-full responsive-top-margin">
<div class="govuk-grid-column-full">
<%= render "govuk_publishing_components/components/heading", {
text: "History of the UK&nbsp;government".html_safe,
heading_level: 1,
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<%= yield :header %>

<main role="main" id="content" class="<%= @content_item.schema_name.dasherize %>" lang="<%= I18n.locale %>">
<main role="main" id="content" class="<%= @content_item.schema_name.dasherize %> govuk-main-wrapper" lang="<%= I18n.locale %>">
<span id="Top"></span>
<%= yield :main %>
</main>
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_title_and_translations.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds responsive-top-margin">
<div class="govuk-grid-column-two-thirds">
<%= render 'govuk_publishing_components/components/heading', @content_item.heading_and_context %>
</div>
<%= render 'shared/translations' %>
Expand Down

0 comments on commit 7b64270

Please sign in to comment.