Skip to content

Commit d63e779

Browse files
authored
fix rightside nav (#2984)
1 parent 8b83b2c commit d63e779

File tree

1 file changed

+51
-1
lines changed

1 file changed

+51
-1
lines changed

src/components/CCIP/TutorialProgress/TutorialProgress.module.css

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,60 @@
22
.tutorialProgress {
33
position: sticky;
44
top: 0;
5-
height: fit-content;
5+
/* Multi-device height with fallbacks */
6+
max-height: 100vh; /* Fallback for older browsers */
7+
max-height: 100dvh; /* Dynamic viewport - adjusts to mobile browsers */
8+
max-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom)); /* Safe area support */
9+
overflow-y: auto;
610
padding: var(--doc-padding) 0;
711
min-width: calc(315px - var(--space-16x));
812
isolation: isolate;
13+
/* Ensure smooth scrolling */
14+
scroll-behavior: smooth;
15+
/* Responsive scrollbar styling */
16+
scrollbar-width: thin;
17+
scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
18+
}
19+
20+
/* Webkit scrollbar styling for cross-browser compatibility */
21+
.tutorialProgress::-webkit-scrollbar {
22+
width: 6px;
23+
}
24+
25+
.tutorialProgress::-webkit-scrollbar-track {
26+
background: transparent;
27+
}
28+
29+
.tutorialProgress::-webkit-scrollbar-thumb {
30+
background: rgba(0, 0, 0, 0.2);
31+
border-radius: 3px;
32+
}
33+
34+
.tutorialProgress::-webkit-scrollbar-thumb:hover {
35+
background: rgba(0, 0, 0, 0.3);
36+
}
37+
38+
/* Mobile-specific optimizations */
39+
@media (max-width: 768px) {
40+
.tutorialProgress {
41+
/* On mobile, use full available height minus header/footer space */
42+
max-height: calc(100dvh - 120px);
43+
/* Slightly larger padding for touch interfaces */
44+
padding: var(--space-4x) 0;
45+
}
46+
47+
/* Hide scrollbar on mobile for cleaner look */
48+
.tutorialProgress::-webkit-scrollbar {
49+
width: 0px;
50+
background: transparent;
51+
}
52+
}
53+
54+
/* Tablet optimizations */
55+
@media (min-width: 769px) and (max-width: 1024px) {
56+
.tutorialProgress {
57+
max-height: calc(100dvh - 80px);
58+
}
959
}
1060

1161
/* Override any parent title tooltips */

0 commit comments

Comments
 (0)