Skip to content

Commit fcaa4a7

Browse files
committed
changed header fixed to sticky
position sticky is more modern and widely supported, this will allow to remove the magic variables in the main and footer
1 parent 0dcf5b6 commit fcaa4a7

3 files changed

Lines changed: 8 additions & 14 deletions

File tree

src/components/Footer.module.css

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.root {
22
position: relative;
3-
top: 150px;
43
z-index: 600;
54
width: 100%;
65
padding-top: var(--margin);
@@ -27,10 +26,12 @@
2726
.contactWrapper {
2827
flex-basis: var(--col2);
2928
font-size: var(--text-small);
29+
3030
& p {
3131
margin-bottom: 0;
3232
font-size: inherit;
3333
}
34+
3435
& a {
3536
font-size: inherit;
3637
}
@@ -39,7 +40,7 @@
3940
.socialmediaWrapper {
4041
flex-basis: var(--col6);
4142

42-
& > ul {
43+
&>ul {
4344
display: flex;
4445
font-size: inherit;
4546

@@ -88,4 +89,4 @@
8889
text-align: center;
8990
}
9091
}
91-
}
92+
}

src/components/Header.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.root {
22
width: 100%;
3-
position: fixed;
3+
position: sticky;
44
top: 0;
55
z-index: 800;
66
background-color: white;
@@ -17,4 +17,4 @@
1717
&:focus {
1818
color: var(--processing-blue-dark);
1919
}
20-
}
20+
}

src/components/Layout.module.css

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
display: flex;
33
flex-direction: column;
44
height: 100%;
5-
min-height: 100%;
5+
min-height: 100vh;
66

77
& h2 {
88
scroll-margin-top: 150px;
@@ -14,7 +14,6 @@
1414
}
1515

1616
.main {
17-
top: 145px;
1817
position: relative;
1918
flex: 1;
2019
padding-top: var(--vertical-margin-large);
@@ -23,10 +22,4 @@
2322

2423
.withBreadcrumbs {
2524
padding-top: var(--vertical-margin-xsmall);
26-
}
27-
28-
@media (--reduced) {
29-
.main {
30-
top: 95px;
31-
}
32-
}
25+
}

0 commit comments

Comments
 (0)