Just throwin this out there:
This is a fun parallax effect with pure css. I don’t understand it so I don’t know what to make of it, not least its bugs(?) like that it somehow messes up navigation! BUT the technique to only have to scroll a bit to get really far is very appealing. It makes it a lot easier to scroll long story rivers. Try it out with several tids opened.
The below includes various crap from my dabbling and because some parts were there in the demo where I found it, which presents it all in a respectable way.
tags: $:/tags/Stylesheet
:root {
--translate: 100px;
}
.tc-page-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
height:1000vh;
xoverflow:auto;
}
x.tc-story-river,
x.tc-tiddler-frame {
position: fixed;
top: 0;
left: 0;
width: 60%;
height: 100%;
xoverflow:auto;
}
.tc-page-container {
background: radial-gradient(circle at center, lightgrey 25%, transparent calc(25% + 1px));
background-size: 2rem 2rem;
}
x.tc-story-river {
background: radial-gradient(circle at 15% 35%, darkorchid 6%, transparent calc(6% + 1px)),
radial-gradient(circle at 35% 25%, darkorchid 5%, transparent calc(5% + 1px)),
radial-gradient(circle at 45% 85%, darkorchid 5%, transparent calc(5% + 1px)),
radial-gradient(circle at 65% 65%, darkorchid 6%, transparent calc(6% + 1px));
}
x.tc-tiddler-frame {
background: radial-gradient(circle at 75% 25%, deeppink 15%, transparent calc(15% + 1px)),
radial-gradient(circle at 25% 75%, deeppink 10%, transparent calc(10% + 1px));
}
x.tc-page-container {
--translate: 50%;
}
.tc-story-river {
--translate: 100%;
}
@media (prefers-reduced-motion: no-preference) {
.tc-page-container,
.tc-story-river,
X.tc-tiddler-frame {
height: calc(100% + var(--translate));
animation: parallax linear;
animation-timeline: scroll(root);
}
}
@keyframes parallax {
from { transform: 0; }
to { transform: translateY(calc(var(--translate) * -1)); }
}
@layer base {
* {
box-sizing: border-box;
}
body {
height: 300vh;
margin: 0;
}
}
.tc-menubar {position:fixed; top:0; /*doesn't work, it's scrolled off anyway*/}