Flex shorthand in UseWebDefaults should set basis to 0 instead of auto #1523
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Since UseWebDefaults was added with
62f47190fb
,62f47190fb/yoga/Yoga.c (L493)
https://www.w3.org/TR/css-flexbox-1/#flex-common says that zeroing is the right interpretation, so UseWebDefaults does the wrong thing seemingly.
UseWebDefaults is going to be in a weird place in general with static and block in the mix.
What is the value in Yoga supporting the shorthand syntax? Why not just stick to the longhand syntax and let the layers above Yoga lower the shorthand into the longhand?
It’s a good question.
Yogas api has historically supported length shorthands through different “edges”, e.g. all vs horizontal vs left. It will then resolve based on specificity.
That’s convenient in not letting the underlying framework need to manage extra state, and the resolved value can depend on things like ltr vs rtl, but if means Yoga must store the information (probably more efficiently than the host would too).
Beyond what we’d do with a clean slate though, I’ve been aiming to avoid non-trivial breaks to the public api (though I introduced plenty of more trivial ones for the next release).