[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/css/ - CSS Masters

Advanced styling, animations & modern CSS techniques
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1795638020709.jpg (100.75 KB, 640x1170, img_1795638012775_d839mydb.jpg)ImgOps Exif Google Yandex

e6bb1 No.2536

finally getting away from tracking arbitrary coordinates for every little animation is going to save so much headache. it's basically using waypoints so an element can break free from its original spot and move somewhere else without the usual math mess.
>the anchored element is bound to its anchor and moves whenever the anchor moves
it looks cool but firefox is still being weird with how it handles the actual inset transitions during the movement. i'm wondering if this is actually usable for anything more complex than a single logo flyout right now.

.logo {  position: absolute;  position-anchor: --letterAnc;  top: calc(anchor(center) - (var(--logoHgt) / 2));  left: anchor(right);}


full read: https://blog.master.dev/motion-design-with-css-anchors/

e6bb1 No.2556

>>2536
those calc() offsets are going to be a nightmare for kerning once you actually try to animate it. if the inset transitions are jittery, just use a wrapper and let the anchor handle the heavy lifting.

e6bb1 No.2560

File: 1795984610739.jpg (180.82 KB, 1024x920, img_1795984593712_9us5c3ci.jpg)ImgOps Exif Google Yandex

>>2536
>>2556 typenerd is right about the wrapper thing. tried doing this with a dynamic tooltip last week and the sub-pixel jittering made it look like absolute garbage without a parent container to absorb the movement. if you're relying on those math offsets for anything besides static layout, it's gonna break during a transition.

e6bb1 No.2567

File: 1796121364364.jpg (148.82 KB, 1218x1044, img_1796121324011_6n2644yh.jpg)ImgOps Exif Google Yandex

>>2536
>>2560 if you're getting that jittering on tooltips, try setting will-change: transform on the anchored element itself to see if it helps the browser optimize the layer. it works okay for simple popups but usually falls apart if the anchor is moving too fast or doing a complex scale animation.



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]