Skip to content

Commit 7927660

Browse files
paulrobertlloydmurugapl
authored andcommitted
Update styles for sticky elements on patient session page
1 parent 2b5258d commit 7927660

2 files changed

Lines changed: 41 additions & 1 deletion

File tree

app/assets/stylesheets/components/_session-banner.scss

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@use "sass:color";
12
@use "../vendor/nhsuk-frontend" as *;
23

34
.app-session-banner {
@@ -46,4 +47,43 @@
4647
margin-left: #{$nhsuk-gutter-half * -1};
4748
}
4849
}
50+
51+
&[data-app-sticky-init] {
52+
position: sticky;
53+
z-index: 999;
54+
top: 0;
55+
right: 0;
56+
left: 0;
57+
58+
width: 100vw;
59+
margin-right: -50vw;
60+
margin-left: -50vw;
61+
}
62+
63+
&[data-stuck="true"] {
64+
border-bottom-color: nhsuk-colour("grey-3");
65+
box-shadow: 0 $nhsuk-border-width 0
66+
color.scale(nhsuk-colour("grey-3"), $alpha: -50%);
67+
68+
.app-main-wrapper--xs {
69+
padding-top: nhsuk-spacing(2);
70+
padding-bottom: 0;
71+
}
72+
73+
.nhsuk-breadcrumb {
74+
@include nhsuk-visually-hidden;
75+
}
76+
77+
.nhsuk-heading-l {
78+
@include nhsuk-font-size(22);
79+
}
80+
81+
.app-secondary-navigation {
82+
box-shadow: none;
83+
}
84+
85+
.app-secondary-navigation__list {
86+
@include nhsuk-font-size(16);
87+
}
88+
}
4989
}

app/assets/stylesheets/core/objects/_grid.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
&[data-app-sticky-init] {
2323
@include nhsuk-media-query($from: large-desktop) {
24-
top: #{nhsuk-spacing(9) + nhsuk-spacing(3)};
24+
top: #{nhsuk-spacing(9) + nhsuk-spacing(5)};
2525
}
2626
}
2727
}

0 commit comments

Comments
 (0)