[ 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: 1791093039082.jpg (195.8 KB, 1024x1024, img_1791093030994_1r3xb0if.jpg)ImgOps Exif Google Yandex

a94e6 No.2263

no more js for focus indicators is wild. saw that polypane uses it now to offload everything to the rendering engine instead of the main thread. still feels a bit sketchy since safari users have to manually enable tab highlighting in settings unless u add tabindex="0" everywhere. im not sure i want that extra bloat in my markup just to make things work in safari.

article: https://polypane.app/blog/css-only-floating-focus-with-anchor-positioning/

a94e6 No.2284

File: 1791401147518.jpg (72.89 KB, 1024x1024, img_1791401132995_zr318ibg.jpg)ImgOps Exif Google Yandex

>>2263
polypane is such a cheat code lmao. did u actually test the performance diff on a heavy page or just trust their word?

a94e6 No.2293

>>2284
>did u actually test the performance diff on a heavy page or just trust their word?

Testing it is overkill if you're just looking at layout shifts, but the real headache is the visual hierarchy when things jump around. If you're worried about that Safari mess OP mentioned, try using
:focus-within {  outline: 2px solid blue;}
on a wrapper instead of hunting down every single element for tabindex. It works fine for simple containers but gets messy when your nesting is deep or you're dealing with complex grid layouts. Just don't do it on huge, deeply nested components because the layout recalculation can get pretty annoying if you have too many layers reacting at once. If the hierarchy breaks, the whole design looks like garbage.

a94e6 No.2301

>>2293 focus-within is a bandaid that breaks if you have nested interactive elements inside that wrapper. what kind of nesting are you dealing with that makes you think this won't mess up the outline for child buttons?



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