Darryl Yeo đ ď¸
@darrylyeo
Behold â a CSS `display: block;` layout that auto-transitions children based on `[hidden]` attributes, while accounting for `margin` collapsing behavior. No JavaScript FLIP animations or DOM removal required. Made possible with modern CSS syntax: ⢠`@starting-style` ⢠`transition-property: display` / `transition-behavior: allow-discrete` ⢠`interpolate-size: allow-keywords;` ⢠`:has()` https://svelte.dev/playground/28dfad59584043e8b367066c99e8bef7?version=5.16.1
2 replies
1 recast
4 reactions
Darryl Yeo đ ď¸
@darrylyeo
You'd think this sort of thing would have been possible with just CSS before now. Only quite recently has CSS given us the proper tools to accomplish this.
0 reply
0 recast
0 reaction
Darryl Yeo đ ď¸
@darrylyeo
D'oh, forgot to post in the channel https://warpcast.com/darrylyeo/0x89027b7a
0 reply
0 recast
0 reaction