2022-10-24 19:22:02 -04:00
|
|
|
.horizontal-overflow-nav {
|
|
|
|
position: relative;
|
|
|
|
min-width: 0;
|
|
|
|
width: 100%;
|
|
|
|
.nav-pills {
|
|
|
|
overflow: auto;
|
|
|
|
min-width: 0;
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
// avoids auto-scroll on initial load if active nav item is overflowed
|
|
|
|
scroll-behavior: auto;
|
|
|
|
|
|
|
|
// hides scrollbars, but allows mouse scrolling
|
|
|
|
scrollbar-width: none;
|
|
|
|
&::-webkit-scrollbar {
|
|
|
|
height: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
&.has-scroll {
|
|
|
|
.nav-pills {
|
|
|
|
scroll-behavior: smooth; // smooth scrolling on user interaction
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.horizontal-overflow-nav__scroll-right,
|
|
|
|
.horizontal-overflow-nav__scroll-left {
|
|
|
|
--fade-width: 1.5em;
|
2023-02-17 10:21:30 -05:00
|
|
|
--fade-color: var(--secondary-rgb); // must be RGB for gradient
|
2022-10-24 19:22:02 -04:00
|
|
|
opacity: 1;
|
|
|
|
position: absolute;
|
|
|
|
z-index: 2;
|
|
|
|
background-color: var(--secondary);
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
transition: opacity 0.25s;
|
|
|
|
.d-icon {
|
|
|
|
pointer-events: none;
|
|
|
|
margin-bottom: 0.2em;
|
2024-06-24 09:54:34 -04:00
|
|
|
color: var(--d-nav-color--active);
|
2022-10-24 19:22:02 -04:00
|
|
|
}
|
|
|
|
&.disabled {
|
|
|
|
// hiding with opacity so we can transition visibility
|
|
|
|
opacity: 0;
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.horizontal-overflow-nav__scroll-right {
|
|
|
|
right: 0;
|
|
|
|
&:before {
|
|
|
|
content: "";
|
|
|
|
margin-left: calc(var(--fade-width) * -1);
|
|
|
|
height: 100%;
|
|
|
|
width: var(--fade-width);
|
|
|
|
background: linear-gradient(
|
|
|
|
to left,
|
2023-02-17 10:21:30 -05:00
|
|
|
rgba(var(--fade-color), 1),
|
|
|
|
rgba(var(--fade-color), 0)
|
2022-10-24 19:22:02 -04:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.horizontal-overflow-nav__scroll-left {
|
|
|
|
left: 0;
|
|
|
|
&:after {
|
|
|
|
content: "";
|
|
|
|
margin-right: calc(var(--fade-width) * -1);
|
|
|
|
height: 100%;
|
|
|
|
width: var(--fade-width);
|
|
|
|
background: linear-gradient(
|
|
|
|
to right,
|
2023-02-17 10:21:30 -05:00
|
|
|
rgba(var(--fade-color), 1),
|
|
|
|
rgba(var(--fade-color), 0)
|
2022-10-24 19:22:02 -04:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|