if you’re dynamically masking a scroll container with css, consider leaving room for the scrollbar instead of masking it too 🧑🍳
mask-repeat: no-repeat;
mask-size: calc(100% - 10px) 100px;
@elonmusk I assure you that the birth rate is mainly due to poor economic resources. More wealth = increased birth rate. I'll tell you this as an underpaid developer who has to support a family with twins, unfortunately we don't get to the end of the month.
Most devs don't know CSS can do spring animations.
This linear function does the trick:
.btn {
...
transition: all 800ms linear(
0,
0.7 10%,
/* overshoot → spring pop */
1.2 20%,
0.9 40%,
/* another small overshoot for realism */
1.05 70%,
1
);
}
.btn:hover {
transform: scale(1.2);
}
The key is those 2 overshoot values.
Going past 1 twice snapping back below 1 is what creates the spring feel on hover.
Have you used linear() before? 👀
scroll-driven wordmark morph w/ css
give each translate axis a different timing function to create a curved motion path instead of a straight line 👇
.wordmark {
animation-name: tx, ty;
animation-timing-function: ease-in, ease-out;
animation-timeline: scroll(root);
}
reminder that you can also create lighting effects with a little css + svg filters
<feSpecularLighting> + <fePointLight> bound to pointer position 👨🍳
using css pow() you can create runtime-configurable fluid typography that responds to viewport or container size 😉
for example, "minimum of 14px at 375px and scale to maximum 24px at 1500px"
all powered by pow() and custom properties