-
In a flex block, when i set Is that a feature? Or there's some way to achieve it.🙏 https://svelte.dev/repl/7d2655d4507a4c2d8c268f72150daeae?version=4.2.19 |
Beta Was this translation helpful? Give feedback.
Answered by
brunnerh
Oct 22, 2024
Replies: 1 comment 1 reply
-
You can create a custom transition that animates function flexSlide(node) {
return {
duration: 250,
easing: quadOut,
css(t, u) {
const grow = window.getComputedStyle(node).flexGrow;
return `
overflow: hidden;
min-width: 0;
flex: ${Math.round(t * 100 * grow) / 100} 1 0px;
`;
},
};
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
vhtmui
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can create a custom transition that animates
flex-grow
. E.g.REPL