Загрузка видео...

Не удалось загрузить видео

На главную

Putting CSS Anchor Positioning to the test by throwing dropdown menus around 💪 [popover].dropdown { top: anchor(bottom); right: anchor(right); position-try-options: flip-block, flip-inline; } That's all 👆 Keeps the menu tethered to the button

112,008 просмотров • 2 лет назад •via X (Twitter)

Комментарии: 9

Фото профиля jhey ▲🐻🎈
jhey ▲🐻🎈2 лет назад

Here's the @CodePen link! 🚀 Starting to piece together these demos for @figma Config 2024 🫡 This demo should be good everywhere. Where Anchoring isn't supported, it uses floating-ui 🤙

Фото профиля Arunabh Verma
Arunabh Verma2 лет назад

Cool, I tried something similar with React Native. I had to find the distance between the edge and the menu, then change its position. Curious about the throwing menu—how is it so smooth? Did you nail that with CSS or need some JS?

Фото профиля 𝓈𝓃𝑜𝓌𝓎 𝚙𝚑𝚒𝚕 🌌✨❄️🫂
𝓈𝓃𝑜𝓌𝓎 𝚙𝚑𝚒𝚕 🌌✨❄️🫂2 лет назад

@chrrynobaka

Фото профиля Daniel Vaughn
Daniel Vaughn2 лет назад

One gotcha that I’ve noticed is that source order matters. You can’t reference an anchor name before it’s declared. Makes sense, but depending the scenario, it can definitely be a pain.

Фото профиля wsk
wsk2 лет назад

Can this be animated? Like here:

Фото профиля Agrim Sharma
Agrim Sharma2 лет назад

So cool

Фото профиля Nine
Nine2 лет назад

My G haha

Фото профиля Nir Galon
Nir Galon2 лет назад

Cool 😎

Фото профиля Alex Inkin
Alex Inkin2 лет назад

Is it possible to shrink height up to some point before flipping vertically?

Похожие видео