From 1607329c4f070531531ec535317fd03156dcbf93 Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Mon, 16 Sep 2024 12:37:15 +0100 Subject: [PATCH] Fix main-content-container to work with govuk-frontend columns This commit removes some of the rules that were previously set for the `.main-content-container` and instead uses the column rules from `govuk-frontend`. The container has now been renamed as `contents-container` to be consistent with the `contents-list-container`. I had hoped to remove this class entirely, but it's required to apply different float rules when in RTL reading mode. --- app/assets/stylesheets/views/_html-publication.scss | 11 +---------- app/views/content_items/html_publication.html.erb | 2 +- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/app/assets/stylesheets/views/_html-publication.scss b/app/assets/stylesheets/views/_html-publication.scss index ef367ff355..aa5ca2b331 100644 --- a/app/assets/stylesheets/views/_html-publication.scss +++ b/app/assets/stylesheets/views/_html-publication.scss @@ -30,16 +30,7 @@ } } - .main-content-container { - width: 100%; - padding: 0 15px; - box-sizing: border-box; - - @include govuk-media-query($from: desktop) { - width: 75%; - float: right; - } - + .contents-container { .direction-rtl & { float: left; } diff --git a/app/views/content_items/html_publication.html.erb b/app/views/content_items/html_publication.html.erb index 4f804de9f2..98ecb008ce 100644 --- a/app/views/content_items/html_publication.html.erb +++ b/app/views/content_items/html_publication.html.erb @@ -64,7 +64,7 @@ -
+
<%= render "govuk_publishing_components/components/govspeak_html_publication", { direction: page_text_direction } do %> <%= raw(@content_item.govspeak_body[:content]) %> <% end %>