style desktop nav panel
This commit is contained in:
parent
57e9ca74da
commit
81454b3e4e
16 changed files with 157 additions and 136 deletions
|
|
@ -1,4 +1,7 @@
|
|||
/* ================= PANELS ================= */
|
||||
#desktop-nav {
|
||||
display: none;
|
||||
}
|
||||
.panel {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
|
|
@ -8,7 +11,6 @@
|
|||
outline: 1px solid #fff;
|
||||
transition: all 0.5s var(--curve-sine);
|
||||
z-index: 2;
|
||||
padding: 0 var(--unit--horizontal);
|
||||
padding-top: calc(var(--unit--vertical) * 5);
|
||||
box-sizing: border-box;
|
||||
|
||||
|
|
@ -16,6 +18,11 @@
|
|||
flex-direction: column;
|
||||
}
|
||||
|
||||
.search,
|
||||
.panel__items {
|
||||
padding: 0 var(--unit--horizontal);
|
||||
}
|
||||
|
||||
.panel--left {
|
||||
left: calc(-100vw - 1px);
|
||||
}
|
||||
|
|
@ -36,6 +43,7 @@
|
|||
background-color: #000;
|
||||
z-index: 1;
|
||||
top: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.search__input {
|
||||
all: unset;
|
||||
|
|
@ -59,8 +67,8 @@
|
|||
height: 1.2rem;
|
||||
padding: 0.5rem;
|
||||
bottom: 0;
|
||||
right: calc(var(--unit--horizontal) / 6);
|
||||
transform: translateX(0.5rem);
|
||||
right: var(--unit--horizontal);
|
||||
transform: translateX(0.5rem) translateY(-0.2rem);
|
||||
}
|
||||
button.search__icon {
|
||||
cursor: pointer;
|
||||
|
|
@ -76,12 +84,11 @@ button.search__icon {
|
|||
.panel-close {
|
||||
justify-content: center;
|
||||
width: calc(100% - 2 * var(--unit--horizontal));
|
||||
bottom: 0;
|
||||
outline: none;
|
||||
border-top: 1px solid #fff;
|
||||
font-size: var(--font-size-m);
|
||||
background-color: #000;
|
||||
padding: calc(var(--unit--vertical) / 2) 0;
|
||||
padding: calc(var(--unit--vertical) / 2) var(--unit--horizontal);
|
||||
margin-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
|
||||
|
|
@ -119,3 +126,38 @@ button.search__icon {
|
|||
.text {
|
||||
margin-bottom: var(--unit--vertical);
|
||||
}
|
||||
|
||||
@media screen and (min-width: 640px) {
|
||||
#desktop-nav {
|
||||
display: block;
|
||||
position: fixed;
|
||||
box-sizing: border-box;
|
||||
z-index: 3;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: var(--padding-body);
|
||||
height: 100vh;
|
||||
padding: var(--unit--vertical) var(--unit--horizontal);
|
||||
}
|
||||
#desktop-nav .empty {
|
||||
height: calc(3 * var(--unit--vertical));
|
||||
}
|
||||
.panel {
|
||||
z-index: 4;
|
||||
width: var(--padding-body);
|
||||
padding-top: var(--unit--vertical);
|
||||
}
|
||||
|
||||
.panel-close {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.panel--right {
|
||||
right: auto;
|
||||
left: calc(-100vw - 1px);
|
||||
}
|
||||
|
||||
.panel--right.open {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue