Skip to content

Commit e69150c

Browse files
update page head and overlay design
1 parent 9066cb7 commit e69150c

File tree

7 files changed

+24
-21
lines changed

7 files changed

+24
-21
lines changed

header.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,3 @@
2323
<?php wp_body_open(); ?>
2424

2525
<?php Chipmunk\Helpers::get_template_part('partials/page-head'); ?>
26-
<?php Chipmunk\Helpers::get_template_part('partials/page-overlay'); ?>

static/dist/css/theme.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/src/styles/components/_overlay.scss

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,21 @@
33
** ----------------------------------------------------------------------------- */
44

55
.c-overlay {
6-
position: fixed;
7-
inset: 0;
6+
@extend %bordered-box;
7+
position: absolute;
8+
top: 100%;
9+
left: 0;
10+
right: 0;
811
z-index: var(--chipmunk--layer--overlay);
912
display: flex;
10-
background-color: var(--chipmunk--color--background);
13+
max-height: calc(100dvh - var(--chipmunk--logo-height) - #{spacer-clamped(3)});
14+
background-color: var(--chipmunk--color--section);
1115
opacity: 0;
12-
transform: translate3d(0, 2rem, 0);
16+
transform: translate3d(0, 1rem, 0);
1317
pointer-events: none;
1418
backface-visibility: hidden;
1519
transition: opacity, transform;
16-
transition-duration: var(--chipmunk--transition-duration);
20+
transition-duration: 150ms;
1721

1822
.has-nav-open & {
1923
opacity: 1;
@@ -32,21 +36,18 @@
3236
display: flex;
3337
flex-direction: column;
3438
justify-content: center;
35-
height: calc(100% - var(--header-height, 0px));
36-
margin-top: var(--header-height, 0);
37-
padding-top: spacer-clamped(5);
38-
padding-bottom: spacer-clamped(5);
39+
padding-top: spacer-clamped(2);
40+
padding-bottom: spacer-clamped(2.5);
3941
}
4042

4143
.c-overlay__menu {
4244
flex: 1;
4345
display: flex;
4446
flex-direction: column;
45-
overflow: auto;
47+
overflow-y: auto;
48+
overscroll-behavior-y: contain;
4649
}
4750

4851
.c-overlay__bottom {
49-
&:not(:first-child) {
50-
margin-top: 5vh;
51-
}
52+
padding-top: spacer-clamped(1.5);
5253
}

static/src/styles/components/_page-foot.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
flex-direction: column;
1717
align-items: flex-start;
1818
justify-content: space-between;
19-
gap: var(--chipmunk--layout--column-gutter);
19+
column-gap: var(--chipmunk--layout--column-gutter);
20+
row-gap: spacer-clamped(1);
2021

2122
@include bp(md) {
2223
flex-direction: row;

static/src/styles/components/_page-head.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
}
2424

2525
.c-page-head__inner {
26+
position: relative;
27+
z-index: var(--chipmunk--layer--head);
2628
padding-top: spacer-clamped(1.5);
2729
padding-bottom: spacer-clamped(1.5);
2830
position: relative;
@@ -31,8 +33,6 @@
3133
justify-content: space-between;
3234
gap: spacer-clamped(2);
3335
min-height: var(--chipmunk--logo-height);
34-
transition-property: padding;
35-
transition-duration: var(--chipmunk--transition-duration);
3636
}
3737

3838
.c-page-head__logo {

static/src/styles/utilities/_hamburger.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
.u-hamburger {
66
// Variables
7-
--hamburger-width: 1.75em;
8-
--hamburger-height: 0.66em;
9-
--hamburger-weight: 2px;
7+
--hamburger-width: 1.25em;
8+
--hamburger-height: 0.6em;
9+
--hamburger-weight: 1.5px;
1010
--hamburger-color: currentColor;
1111
--hamburger-duration: 0.25s;
1212
--hamburger-radius: 3px;

templates/partials/page-head.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,6 @@
8888
<?php endif; ?>
8989
</div>
9090
</div>
91+
92+
<?php Chipmunk\Helpers::get_template_part('partials/page-overlay'); ?>
9193
</header>

0 commit comments

Comments
 (0)