RT jhey 🔨🐻✨
CSS Tip! ✨
Combine :has() and trig functions to select previous siblings and create an Apple-style OS dock 🔥
CSS only, no JS! 🤯
.b:has(+ .b:hover),
.b:hover + .b {
flex: calc(0.2 + (sin(30deg) * 1.5));
translate: 0 calc(sin(30deg) * -75%);
}
@CodePen link below! 👇
https://twitter.com/jh3yy/status/1684973205679742995