lazy exclusion tabs using CSS :has() 🐐
transition custom properties for a clip-path
give one a slight delay
.track {
clip-path: inset(0 var(--x2) 0 var(--x1));
transition: --x1 0.2s, --x2 0.2s 0.1s;
}
.tabs:has(input:nth-of-type(1):checked) .track {
--x1: 0; --x2: 89%;
}
(trick in video 🚀)