Svelte 3.57 Features and Fixes
Svelte 3.57 was recently released, with bug fixes and new features such as the `style:` directive and the reintroduction of the `<svelte:document>` tag. Learn more about these and other features in this blog post.
Geoff Rich
I make websites, help maintain @SvelteJS, and play piano. ❤ cats, books, and video game music. 🐘 @geoffrich@front-end.social
-
The Svelte release train just keeps rolling! Svelte 3.57 was released two days ago - here are some of the feature highlights. pic.twitter.com/j9Q0ou4sG1
— Geoff Rich (@geoffrich_) March 17, 2023 -
The `style:` directive will take precedence over the `style` attribute. Previously, there was a bug where updating the value `style` attribute would clobber anything in a style directive.
— Geoff Rich (@geoffrich_) March 17, 2023
Buggy version: https://t.co/xEuqTx7LTq
Fixed version: https://t.co/WnX0h6Y9v4 -
A bug was fixed where you would get a compiler error when destructuring an array in the markup. The following will now compile successfully: pic.twitter.com/eDQcsRWM2m
— Geoff Rich (@geoffrich_) March 17, 2023 -
<svelte:document> is back! It was originally removed due to inconsistencies in mouse events, but is now back to support listening to document-specific events. Trying to listen to mouseenter/leave events will trigger a compiler warning. pic.twitter.com/H5a6aK358K
— Geoff Rich (@geoffrich_) March 17, 2023 -
Finally, you can now use CSS units in the fly and blur transitions! Previously, you could only pass a number that would be treated as `px`. pic.twitter.com/tfmNiLzfBg
— Geoff Rich (@geoffrich_) March 17, 2023 -
And more - see the CHANGELOG for the rest with links to relevant PRs.https://t.co/Q4YL5CCBt0
— Geoff Rich (@geoffrich_) March 17, 2023