fix sticky problems

This commit is contained in:
isUnknown 2024-04-10 14:55:34 +02:00
parent d9dcd940af
commit ba450cbb1f
15 changed files with 212 additions and 142 deletions

View file

@ -1,50 +1,3 @@
/* ================= ENTRIES BTNS ================= */
#entry-btns {
position: sticky;
top: calc(var(--unit--vertical) * 10);
display: flex;
justify-content: space-between;
z-index: 2;
}
.entry-btn {
transition: all 0.5s var(--curve-sine);
}
[data-template="home"] #entry-btns {
transform: translateY(calc(0rem - var(--unit--vertical-relative) * 8));
}
[data-template="linear"] #entry-btns {
transform: translateY(calc(0rem - var(--unit--vertical-relative) * 4));
}
.entry-btn--left::after,
.entry-btn--right::before {
transition: all 0.5s var(--curve-sine);
content: "+";
}
.entry-btn--left::after {
margin-left: var(--unit--horizontal);
}
.entry-btn--right::before {
margin-right: var(--unit--horizontal);
}
#entry-btns.minimized {
color: var(--color-secondary);
}
#entry-btns.minimized .entry-btn::before,
#entry-btns.minimized .entry-btn::after {
font-weight: bold;
}
#entry-btns.minimized .entry-btn--left {
margin-left: calc(-4px - var(--width));
}
#entry-btns.minimized .entry-btn--right {
margin-right: calc(-4px - var(--width));
}
/* ================= PANELS ================= */
.panel {
position: fixed;
@ -58,16 +11,31 @@
padding: 0 var(--unit--horizontal);
padding-top: calc(var(--unit--vertical) * 5);
box-sizing: border-box;
overflow: auto;
display: flex;
flex-direction: column;
}
.panel--left {
left: calc(-100vw - 1px);
}
.panel--right {
right: calc(-100vw - 1px);
}
.panel--left.open {
left: 0;
}
.panel--right.open {
right: 0;
}
.search {
position: fixed;
width: calc(100% - 2 * var(--unit--horizontal));
position: relative;
width: 100%;
background-color: #000;
z-index: 1;
top: 0;
padding-top: calc(var(--unit--vertical) * 5);
}
.search__input {
all: unset;
@ -82,7 +50,7 @@
font-weight: var(--font-weight-light);
}
.search__input::placeholder {
font-size: var(--font-size-s);
font-size: var(--font-size-sm);
letter-spacing: 1px;
}
.search__icon {
@ -100,26 +68,13 @@ button.search__icon {
}
.panel__items {
margin-top: calc(var(--unit--vertical) * 2);
margin-bottom: calc(var(--unit--vertical) * 4);
}
.panel--left {
left: calc(-100% - var(--unit--horizontal) * 2 - 1px);
}
.panel--right {
right: calc(-100% - var(--unit--horizontal) * 2 - 1px);
}
.panel--right.open {
right: 0;
}
.panel--left.open {
left: 0;
scroll-behavior: smooth;
height: 100%;
padding-top: var(--unit--vertical);
overflow: auto;
}
.panel-close {
position: fixed;
justify-content: center;
width: calc(100% - 2 * var(--unit--horizontal));
bottom: 0;