[ 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: 1795112169330.jpg (173.59 KB, 1024x1024, img_1795112160345_q2n6glt5.jpg)ImgOps Exif Google Yandex

25810 No.2502

saw mat's post about those sidenote components he's building for his site. it's basically just an aside wrapped in some markdown through an eleventy shortcode, but the way he's styling them is a bit much. he's using animation-timeline: view() to make them scale up as they hit the center of the viewport. then he adds a little transform: rotate(2deg) because apparently perfectly straight text is too boring for him.
>a perfectly squared span of text wasn't quite getting that across
it feels like overkill for some marginalia, but i guess it works if you want that hand-scribbled look. the grid layout part seems straightforward enough, though i'm not sure how much performance hit you get with all those scroll-driven animations happening at once. honestly, it's just a lot of work to make something look slightly messy on purpose. i'd probably just stick to a simple rotation and call it a day. does anyone actually use view() for minor UI polish like this in production?

article: https://piccalil.li/blog/understanding-css-random/?ref=main-rss-feed

25810 No.2517

File: 1795263927515.jpg (176.19 KB, 1024x1024, img_1795263912391_swfz327b.jpg)ImgOps Exif Google Yandex

>>2502
>i'm not sure how much performance hit you get with all those scroll-driven animations happening at once.

If he's just scaling and rotating, it shouldn't tank anything since they're compositor-only properties. You only really need to worry about a laggy main thread if he starts adding heavy box-shadows or filters to the animation loop. Use
will-change: transform
on the aside elements if there are dozens of them on one page, but it's probably overkill for a standard blog post.

25810 No.2526

File: 1795415699691.jpg (243.12 KB, 1000x1000, img_1795415684719_p0fgt3qn.jpg)ImgOps Exif Google Yandex

>>2517
I think you're right about it being compositor-only, but I still worry about mobile browsers getting weird with too many active timelines. >>2502 did you actually try testing that view() animation on a mid-range phone or are you just assuming it'll be fine? It felt janky when I tried something similar for a client project last month.

25810 No.2538

>>2526
>It felt janky when I tried something similar for a client project last month.

I ran into that too with Safari on iOS. The scroll-driven animations seem fine on desktop Chrome, but the moment you hit mobile, the frame rate drops like crazy if the elements overlap. It's probably because of how the browser handles the intersection calculations while trying to render the rest of the page. I've started using a simple intersection observer as a fallback to just toggle a class instead of relying on the timeline. It doesn't give you that smooth scaling effect, but it keeps the scrolling from feeling like sludge. If you really want the animation, maybe limit it to only the first few notes or something.



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