Replies: 3 comments
This comment was marked as spam.
This comment was marked as spam.
-
|
Spent a long time debugging a Potentially @starting-style fails to apply when the value that changes is inside a custom property. .starting\:translate-y-200 {
@starting-style {
--tw-translate-y: calc(var(--spacing) * 200);
translate: var(--tw-translate-x) var(--tw-translate-y);
}
} |
Beta Was this translation helpful? Give feedback.
-
|
It appears that things do not work correctly when using a custom property that is defined with @property --custom-prop {
syntax: '*';
inherits: false;
initial-value: 0;
}
div {
@starting-style {
translate: var(--custom-prop) 100px;
}
}https://codepen.io/atoka/pen/ogLNmGB This behavior is not limited to /* not working */
div {
@starting-style {
inset: var(--custom-prop) 100px;
}
}Interestingly, if As a workaround, avoiding shorthand properties seems to help. For example, using <div class="mt-50 h-10 w-10 bg-red-500 duration-1000 starting:transform-[translateY(400px)]"></div> |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm not sure if this is a tailwind or safari bug but I ran into an issue where starting-style seems to break.
https://play.tailwindcss.com/ClQpDWz4UT
The red square is supposed to animate up to the top from the bottom. This works in Chrome and FF but not Safari 18.5.
I recreated the example with plain CSS and it works properly in Safari:
https://codepen.io/RaederDev/pen/VYLxGqx
I cannot figure out what tailwind is doing differently here or how to solve this.
Beta Was this translation helpful? Give feedback.
All reactions