Skip to content

Commit 6cfc93f

Browse files
committed
Adjust spacing of the Interruption panel
1 parent 73ee614 commit 6cfc93f

1 file changed

Lines changed: 25 additions & 1 deletion

File tree

  • packages/govuk-frontend/src/govuk/components/panel

packages/govuk-frontend/src/govuk/components/panel/_mixin.scss

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@
4343
margin-bottom: base.govuk-spacing(6);
4444
}
4545

46-
.govuk-panel__title:last-child {
46+
// Remove bottom spacing from anything at the end of the Panel's body
47+
// to stop the Panel's padding spacing from becoming too large.
48+
.govuk-panel__title:last-child,
49+
.govuk-panel__body > :last-child {
4750
margin-bottom: 0;
4851
}
4952

@@ -56,6 +59,27 @@
5659
--govuk-text-colour: #{base.govuk-functional-colour(inverse-text)};
5760
background: base.govuk-functional-colour(brand);
5861
text-align: left;
62+
63+
// Smaller title to go alongside smaller body text.
64+
.govuk-panel__title {
65+
@include base.govuk-font-size($size: 36);
66+
margin-bottom: base.govuk-spacing(3);
67+
}
68+
69+
// When the Button group is at the end of the Panel's body then,
70+
// make sure it has some spacing away from the other body content.
71+
.govuk-panel__body > .govuk-button-group:last-child {
72+
margin-top: base.govuk-spacing(6);
73+
}
74+
75+
// On larger screens if the Interruption panel has a Button group at the end of the Panel's body,
76+
// then we want to adjust the spacing a bit to avoid the Button group
77+
// making the Panel's padding spacing being too large.
78+
@media #{base.govuk-from-breakpoint(tablet)} {
79+
&:has(.govuk-panel__body > .govuk-button-group:last-child) {
80+
padding-bottom: base.govuk-spacing(5);
81+
}
82+
}
5983
}
6084

6185
@media print {

0 commit comments

Comments
 (0)