Skip to content

Commit 93da5a7

Browse files
committed
Use content box for sizing of header and footer
1 parent b51959e commit 93da5a7

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

app/styles/nav-stack.scss

+10-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
$nav-stack-header-height: 44px;
2-
$nav-stack-footer-height: 50px;
1+
:root {
2+
--nav-stack-header-height: 44px;
3+
--nav-stack-footer-height: 50px;
4+
}
35

46
$easing: cubic-bezier(.23, 1, .32, 1);
57

@@ -26,14 +28,14 @@ $easing: cubic-bezier(.23, 1, .32, 1);
2628
}
2729
&-itemContainer {
2830
position: absolute;
29-
top: $nav-stack-header-height;
31+
top: var(--nav-stack-header-height);
3032
bottom: 0;
3133
left: 0;
3234
width: 500%;
3335
}
3436

3537
&--withFooter &-itemContainer {
36-
bottom: $nav-stack-footer-height;
38+
bottom: var(--nav-stack-footer-height);
3739
}
3840

3941
&-item {
@@ -63,7 +65,8 @@ $easing: cubic-bezier(.23, 1, .32, 1);
6365

6466
&-header {
6567
position: absolute;
66-
height: $nav-stack-header-height;
68+
height: var(--nav-stack-header-height);
69+
box-sizing: content-box;
6770
top: 0;
6871
left: 0;
6972
right: 0;
@@ -93,7 +96,8 @@ $easing: cubic-bezier(.23, 1, .32, 1);
9396
&-footer {
9497
position: absolute;
9598
bottom: 0;
96-
min-height: $nav-stack-footer-height;
99+
height: var(--nav-stack-footer-height);
100+
box-sizing: content-box;
97101
left: 0;
98102
right: 0;
99103
background: rgba(0,0,0,.2);

0 commit comments

Comments
 (0)