Skip to content

Commit 8f5b04d

Browse files
author
Fergus Bisset
committed
fix(header-fdp/mobile): constrain service area to 90% width and proportionally scale graphic logo + text at mobile breakpoints\n\n- Limit .nhsuk-header__service to max-width: 90% on small screens\n- Use clamp() for service name font-size under FDP brand\n- Size graphic logo variant in em at mobile so it scales with text\n- Verified via CSS build and SSR tests (218 pass)
1 parent 4e35ae7 commit 8f5b04d

File tree

4 files changed

+224
-138
lines changed

4 files changed

+224
-138
lines changed

dist/components/Header/Header.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,13 @@
650650
[data-brand=fdp] .nhsuk-header .nhsuk-header__service {
651651
justify-content: center;
652652
}
653+
@media (max-width: calc(768px - 1px)) {
654+
[data-brand=fdp] .nhsuk-header .nhsuk-header__service {
655+
max-width: 90%;
656+
margin-inline: auto;
657+
gap: 8px;
658+
}
659+
}
653660
[data-brand=fdp] .nhsuk-header__container {
654661
padding-left: 32px;
655662
padding-right: 32px;
@@ -673,6 +680,24 @@
673680
}
674681
[data-brand=fdp] .nhsuk-header__service-name {
675682
font-size: 24px;
683+
line-height: 1.1;
684+
}
685+
@media (max-width: calc(768px - 1px)) {
686+
[data-brand=fdp] .nhsuk-header__service-name {
687+
font-size: clamp(16px, 5vw, 20px);
688+
}
689+
}
690+
@media (max-width: calc(768px - 1px)) {
691+
[data-brand=fdp] .nhsuk-header__organisation-logo {
692+
height: auto;
693+
max-width: 90%;
694+
}
695+
}
696+
@media (max-width: calc(768px - 1px)) {
697+
[data-brand=fdp] .nhsuk-header__organisation-logo[data-logo-variant=graphic] {
698+
width: 7.5em;
699+
max-width: 90%;
700+
}
676701
}
677702
[data-brand=fdp] .nhsuk-header__navigation-list {
678703
justify-content: space-evenly;

dist/components/Header/index.css

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,14 @@ span .nhsuk-u-visually-hidden {
953953
justify-content: center;
954954
}
955955

956+
@media (max-width: calc(768px - 1px)) {
957+
[data-brand=fdp] .nhsuk-header .nhsuk-header__service {
958+
max-width: 90%;
959+
margin-inline: auto;
960+
gap: 8px;
961+
}
962+
}
963+
956964
[data-brand=fdp] .nhsuk-header__container {
957965
padding-left: 32px;
958966
padding-right: 32px;
@@ -981,6 +989,27 @@ span .nhsuk-u-visually-hidden {
981989

982990
[data-brand=fdp] .nhsuk-header__service-name {
983991
font-size: 24px;
992+
line-height: 1.1;
993+
}
994+
995+
@media (max-width: calc(768px - 1px)) {
996+
[data-brand=fdp] .nhsuk-header__service-name {
997+
font-size: clamp(16px, 5vw, 20px);
998+
}
999+
}
1000+
1001+
@media (max-width: calc(768px - 1px)) {
1002+
[data-brand=fdp] .nhsuk-header__organisation-logo {
1003+
height: auto;
1004+
max-width: 90%;
1005+
}
1006+
}
1007+
1008+
@media (max-width: calc(768px - 1px)) {
1009+
[data-brand=fdp] .nhsuk-header__organisation-logo[data-logo-variant=graphic] {
1010+
width: 7.5em;
1011+
max-width: 90%;
1012+
}
9841013
}
9851014

9861015
[data-brand=fdp] .nhsuk-header__navigation-list {

0 commit comments

Comments
 (0)