Skip to content

Commit

Permalink
fix: Fix column layout stacking and stretching (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
killij authored Jan 22, 2024
1 parent 24281e5 commit 4f1998a
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Childrens-Social-Care-CPD/Views/Shared/_ColumnLayout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

@foreach (var group in Model.Items.Select((e, i) => new { ContentItem = e, Grouping = (i / Model.ColumnCount) }).GroupBy(e => e.Grouping))
{
<div class="govuk-grid-row">
<div class="govuk-grid-row columns-layout">
@foreach (var item in group)
{
<div class="@gridClass govuk-!-margin-bottom-4" style="display: flex">
<div class="@gridClass govuk-!-margin-bottom-4 columns-layout-col">
@{ await Html.RenderContentfulPartialAsync(item.ContentItem); }
</div>
}
Expand Down
9 changes: 9 additions & 0 deletions Childrens-Social-Care-CPD/styles/scss/overrides/_site.scss
Original file line number Diff line number Diff line change
Expand Up @@ -252,4 +252,13 @@
background-color: #ffdd00;
font-weight: bold;
font-style: normal;
}

.columns-layout {
display: flex;
flex-wrap: wrap;
}

.columns-layout-col {
display: flex;
}
9 changes: 9 additions & 0 deletions Childrens-Social-Care-CPD/wwwroot/css/application.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Childrens-Social-Care-CPD/wwwroot/css/application.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Childrens-Social-Care-CPD/wwwroot/css/application.min.css

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit 4f1998a

Please sign in to comment.