Files
andwati.com/sass/_scroll-top.scss
T
andwati a51671d7e4 redesign site as "case file" theme
- new paper/ink palette with single red accent, replacing catppuccin
- self-hosted IBM Plex Serif (display) + Source Serif 4 (body), drop Outfit
- rebuilt homepage masthead, numbered post index, navbar with active states
- switch syntax highlighting + utterances to gruvbox, synced via postMessage
- remove terminal/404 easter egg chrome, clean up remaining inline styles
- fix stray syntax.css link causing a 404
2026-07-16 12:28:34 +03:00

65 lines
1.4 KiB
SCSS

// Scroll to Top Floating Button
.scroll-to-top {
position: fixed;
bottom: 2rem;
right: 2rem;
display: flex;
align-items: center;
justify-content: center;
width: 3rem;
height: 3rem;
border-radius: 2px;
background: var(--bg-color);
color: var(--accent-color);
border: 1px solid var(--accent-color);
cursor: pointer;
z-index: 100;
// Hidden state by default
opacity: 0;
visibility: hidden;
transform: translateY(1rem);
transition:
transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
visibility 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
box-shadow 0.2s ease-out;
// Visible state triggered by JS
&.visible {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
@media (hover: hover) {
&:hover {
background: var(--accent-color);
color: var(--bg-color);
transform: translateY(-0.25rem);
box-shadow: 0 4px 12px color-mix(in srgb, var(--accent-color) 20%, transparent);
}
&:hover svg {
transform: translateY(-2px);
}
}
&:focus-visible {
outline: 2px solid var(--accent-color);
outline-offset: 4px;
}
svg {
transition: transform 0.2s ease;
}
// Responsive padding for mobile devices
@media (max-width: 768px) {
bottom: 1.5rem;
right: 1.5rem;
width: 2.75rem;
height: 2.75rem;
}
}