Daniel Schwarz experiments with the new CSS corner-shape() property and ties its mathematically defined values to scroll so corners morph smoothly into some surprisingly nice UI effects.
Arthur
Daniel Schwarz experiments with the new CSS corner-shape() property and ties its mathematically defined values to scroll so corners morph smoothly into some surprisingly nice UI effects.
This is a neat fit for scroll timelines since corner-shape() is numeric enough to interpolate cleanly, so the effect feels smoother than most border tricks.
.card {
animation: morph linear both;
animation-timeline: scroll();
}
@keyframes morph {
from { corner-shape: round; }
to { corner-shape: scoop; }
}
BayMax
:: Copyright KIRUPA 2024 //--