Skip to content

Commit

Permalink
New page width is only enabled with new_homepage flag
Browse files Browse the repository at this point in the history
  • Loading branch information
SamDudley committed Aug 5, 2024
1 parent b2ac201 commit 1f7b816
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion assets/stylesheets/components/_search_field.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $input-size: 40px;
position: relative;
display: flex;
flex: 0 $input-size;
margin: 4px 0 7px 0;
margin: 7px 0 7px 0;

input {
// overly specific to prevent some overrides from outside
Expand Down
2 changes: 2 additions & 0 deletions assets/stylesheets/components/_streamfield-content.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.ws-streamfield-content {
max-inline-size: 75ch;

h3 {
@extend %govuk-heading-s;
}
Expand Down
3 changes: 3 additions & 0 deletions assets/stylesheets/govuk-overrides/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
.site-search .search-form input {
border: 2px solid govuk-colour("black");;
}
.site-search .search-form {
margin: 4px 0 7px 0;
}
}

.govuk-header {
Expand Down
3 changes: 2 additions & 1 deletion src/core/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
{% block libraries %}
{% endblock libraries %}
</head>
<body class="govuk-template__body {% block body_classes %}{% endblock %} ">
<body class="govuk-template__body {% block body_classes %}{% endblock %} "
data-flag-new-homepage="{{ FEATURE_FLAGS.new_homepage }}">
{% if settings.GTM_CODE %}
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{ settings.GTM_CODE }}"
Expand Down
10 changes: 10 additions & 0 deletions src/dw_design_system/dwds/styles/layout.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
// Container

// TODO: Remove once everyone is using the new homepage.
body[data-flag-new-homepage="False"] {
--page-width: 960px;

.dwds-container {
padding-left: 0;
padding-right: 0;
}
}

.dwds-container {
max-width: var(--page-width);
margin-left: auto;
Expand Down

0 comments on commit 1f7b816

Please sign in to comment.