Improve tab scrolling with arrows
This commit is contained in:
@@ -62,6 +62,7 @@ body {
|
||||
-webkit-overflow-scrolling: touch;
|
||||
scrollbar-width: none;
|
||||
-ms-overflow-style: none;
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
.page-tabs-slider::-webkit-scrollbar,
|
||||
@@ -69,6 +70,102 @@ body {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tabs-scroll-shell {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
max-width: 100%;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.tabs-scroll-slider {
|
||||
cursor: grab;
|
||||
overscroll-behavior-x: contain;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.tabs-scroll-slider--dragging {
|
||||
cursor: grabbing;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.tabs-scroll-arrow {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
border-radius: 999px;
|
||||
border: 1px solid var(--color-border);
|
||||
background: var(--color-bg-elevated);
|
||||
color: var(--color-text-secondary);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: var(--shadow-md);
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease, color 0.2s ease;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.tabs-scroll-arrow .material-symbols-outlined {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.tabs-scroll-arrow.visible {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.tabs-scroll-arrow:hover {
|
||||
background: var(--color-bg-card);
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.tabs-scroll-arrow:active {
|
||||
transform: translateY(-50%) scale(0.96);
|
||||
}
|
||||
|
||||
.tabs-scroll-arrow.left {
|
||||
left: -12px;
|
||||
}
|
||||
|
||||
.tabs-scroll-arrow.right {
|
||||
right: -12px;
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.tabs-scroll-slider {
|
||||
touch-action: pan-x;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.tabs-scroll-arrow {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.tabs-scroll-arrow.left {
|
||||
left: -8px;
|
||||
}
|
||||
|
||||
.tabs-scroll-arrow.right {
|
||||
right: -8px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.tabs-scroll-arrow.left {
|
||||
left: -6px;
|
||||
}
|
||||
|
||||
.tabs-scroll-arrow.right {
|
||||
right: -6px;
|
||||
}
|
||||
}
|
||||
|
||||
@supports (color: color-mix(in srgb, black, white)) {
|
||||
.page-tabs-slider,
|
||||
.admin-tabs-slider {
|
||||
|
||||
Reference in New Issue
Block a user