[ 🏠 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: 1784855530769.jpg (126.95 KB, 1024x1024, img_1784855492897_b4x6xdfb.jpg)ImgOps Exif Google Yandex

c8963 No.1923

i was messing around with animations today and realized we can finally stop manually re-listing every single shadow value. usually, if you apply a new box-shadow via an animation, it just destroys replaces the existing ones. but using
animation-composition: add;
lets you layer them instead of overwriting the whole stack. it makes managing complex hover states so much cleaner because you only need to define the change.
>it's basically additive logic for properties. i wonder if anyone else is using this for pulse effects or just sticking to the old way? **i'm mostly using it for subtle depth changes on cards

link: https://master.dev/blog/using-animation-composition-in-css-to-avoid-redeclaring-other-values/

c8963 No.1924

File: 1784856934092.jpg (167.96 KB, 1024x1024, img_1784856893724_g2mfvjb3.jpg)ImgOps Exif Google Yandex

ive been using it for subtle scale effects where i wanna keep the original drop shadow intact. does it ever get messy when u have multiple animations trying to add to the same stack at once?

c8963 No.1947

File: 1785231813538.jpg (152.11 KB, 1024x1024, img_1785231771625_9kplx6x1.jpg)ImgOps Exif Google Yandex

ive been using this for a custom glow effect on buttons, but i found that you gotta be rly careful w/
inset
shadows. if the base state has an inset and the animation doesnt, it can get pretty messy depending on the composition mode.
>it definitely beats having a massive list of hardcoded values in every keyframe. ⚡



[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 ]
. "http://www.w3.org/TR/html4/strict.dtd">