Skip to content

Commit

Permalink
Merge pull request #3332 from alphagov/html-publication-columns-fix
Browse files Browse the repository at this point in the history
Fix HTML Publication layout to work with design system columns
  • Loading branch information
matthillco authored Sep 17, 2024
2 parents cbbbf70 + 9019d3d commit 0d81a3e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
11 changes: 1 addition & 10 deletions app/assets/stylesheets/views/_html-publication.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions app/views/content_items/html_publication.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<% end %>

<div id="contents">
<div class="govuk-grid-row">
<div class="govuk-grid-row gem-print-columns-none">
<% if @content_item.contents.any? %>
<div class="govuk-grid-column-one-quarter-from-desktop contents-list-container">
<%= render 'govuk_publishing_components/components/contents_list', contents: @content_item.contents, format_numbers: true %>
Expand All @@ -64,7 +64,7 @@
</div>
</div>

<div class="main-content-container<% unless @content_item.contents.any? %> offset-empty-contents-list<% end %>">
<div class="govuk-grid-column-three-quarters-from-desktop contents-container<% unless @content_item.contents.any? %> offset-empty-contents-list<% end %>">
<%= render "govuk_publishing_components/components/govspeak_html_publication", { direction: page_text_direction } do %>
<%= raw(@content_item.govspeak_body[:content]) %>
<% end %>
Expand Down

0 comments on commit 0d81a3e

Please sign in to comment.