Skip to content

Commit 4451590

Browse files
committed
Move control of overall padding of side pane content
The fact that we needed to apply padding to both `app-breadcrumbs` and `app-content` was a sign that the padding was not applied to the right elements and should instead be applied to their parent. This means that whatever gets added inside `app-side-pane__content`, the right amount of space will surround it.
1 parent e789972 commit 4451590

File tree

2 files changed

+7
-17
lines changed

2 files changed

+7
-17
lines changed

src/stylesheets/components/_split-pane.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,16 @@ $toc-width-tablet: 210px;
3030
}
3131

3232
.app-split-pane__content {
33+
padding-top: govuk-spacing(3);
34+
padding-bottom: govuk-spacing(4);
35+
3336
@include govuk-media-query($from: tablet) {
3437
display: flex;
3538
min-width: 0;
39+
40+
padding-top: govuk-spacing(6);
41+
padding-bottom: govuk-spacing(8);
42+
padding-left: govuk-spacing(6);
3643
flex: 1 1 100%;
3744
flex-direction: column;
3845
}

src/stylesheets/main.scss

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,6 @@ $app-code-color: #d13118;
7575
@include govuk-width-container(1100px);
7676
}
7777

78-
.app-breadcrumbs,
79-
.app-content {
80-
padding-top: govuk-spacing(3);
81-
padding-left: govuk-spacing(3);
82-
83-
@include govuk-media-query($from: tablet) {
84-
padding-top: govuk-spacing(6);
85-
padding-left: govuk-spacing(6);
86-
}
87-
}
88-
8978
.app-breadcrumbs {
9079
// match top padding of the first item in the pane navigation so that the
9180
// breadcrumbs line up nicely
@@ -94,12 +83,6 @@ $app-code-color: #d13118;
9483
}
9584

9685
.app-content {
97-
padding-bottom: govuk-spacing(4);
98-
99-
@include govuk-media-query($from: tablet) {
100-
padding-bottom: govuk-spacing(8);
101-
}
102-
10386
h1 {
10487
max-width: 15em;
10588
}

0 commit comments

Comments
 (0)