fixing scroll to top button
This commit is contained in:
@@ -1222,13 +1222,6 @@ html {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
overflow-x: hidden;
|
||||
max-width: 100vw;
|
||||
/* Forces the body to respect the viewport in landscape too */
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
/* Catch-all: any block element that might overflow */
|
||||
*,
|
||||
*::before,
|
||||
@@ -1269,47 +1262,17 @@ figure {
|
||||
|
||||
#scroll-to-top {
|
||||
position: fixed;
|
||||
bottom: 1.5rem;
|
||||
right: 1.5rem;
|
||||
z-index: 9999;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
/* No display rule here — JS toggles between none and block */
|
||||
text-align: center;
|
||||
line-height: 40px; /* vertically centers the SVG without needing flex */
|
||||
background: rgba(0, 0, 0, 0.65);
|
||||
border: var(--border-width) solid rgba(255, 255, 255, 0.35) !important;
|
||||
border-radius: 50%;
|
||||
color: rgba(255, 255, 255, 0.85) !important;
|
||||
text-decoration: none;
|
||||
transition: border-color var(--transition-normal), color var(--transition-normal), transform var(--transition-normal);
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
#scroll-to-top:hover {
|
||||
border-color: rgba(255, 255, 255, 0.75);
|
||||
color: #ffffff !important;
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
#scroll-to-top svg {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
#scroll-to-top {
|
||||
bottom: 1rem;
|
||||
bottom: 4.5rem;
|
||||
right: 1rem;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
line-height: 36px; /* must match height */
|
||||
z-index: 9999;
|
||||
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
#scroll-to-top:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
|
||||
/* ============================================================================
|
||||
LONG LINKS & BIBLIOGRAPHY - OVERFLOW FIX
|
||||
============================================================================ */
|
||||
|
||||
Reference in New Issue
Block a user