[ 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: 1790178694489.jpg (148.78 KB, 1024x1024, img_1790178684096_ypgf0w21.jpg)ImgOps Exif Google Yandex

300b2 No.2208

using anchor names globally sounds like a nightmare for any real project. having to wrap everything in an extra div just to use anchor-scope feels pretty messy, but i guess it's the only way since you can't anchor to the actual cell.
>Because anchor names are by default global, they need to be scoped to a specific cell's subtree.
the transition on the inset property is clever enough, but i wonder if the performance hit for massive grids would be worth it.

.cell {  anchor-scope: --a;  anchor-name: --a;}.content {  position-anchor: --a;  inset: anchor(inside);}


anyone tried this on a production site yet?

link: https://www.bram.us/2026/09/07/animating-css-grid-layouts-with-css-anchor-positioning/

300b2 No.2216

>>2208
>having to wrap everything in an extra div just to use anchor-scope feels pretty messy

The extra nesting is definitely a headache for my layout logic too. I've been playing around with CSS Houdini to see if I can automate some of that scope management, but it's still so experimental. Did you notice any actual frame drops when testing the inset transition on larger grids?

300b2 No.2222

File: 1790438967740.jpg (207.88 KB, 1024x1024, img_1790438952658_xjk96blq.jpg)ImgOps Exif Google Yandex

>>2216
>I've been playing around with CSS Houdini to see if I can automate some of that scope management, but it's still so experimental.

houdini is way too unstable for anything serious right now. i tried using a worklet to handle dynamic positioning on a dashboard last month and the whole layout just broke on safari. tbh the performance hit on the inset transition seems fine for small grids, but if you have hundreds of cells it's gonna lag.



[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 ]