Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change comment on Yoga measure modes in RN #41732

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -604,13 +604,11 @@ void YogaLayoutableShadowNode::layoutTree(
react_native_assert(!std::isinf(minimumSize.width));
react_native_assert(!std::isinf(minimumSize.height));

// Internally Yoga uses three different measurement modes controlling layout
// constraints: `Undefined`, `Exactly`, and `AtMost`. These modes are an
// implementation detail and are not defined in `CSS Flexible Box Layout
// Module`. Yoga C++ API (and `YGNodeCalculateLayout` function particularly)
// does not allow to specify the measure modes explicitly. Instead, it infers
// these from styles associated with the root node.
// To pass the actual layout constraints to Yoga we represent them as
// Yoga C++ API (and `YGNodeCalculateLayout` function particularly)
// does not allow to specify sizing modes (see
// https://www.w3.org/TR/css-sizing-3/#auto-box-sizes) explicitly. Instead, it
// infers these from styles associated with the root node. To pass the actual
// layout constraints to Yoga we represent them as
// `(min/max)(Height/Width)` style properties. Also, we pass `ownerWidth` &
// `ownerHeight` to allow proper calculation of relative (e.g. specified in
// percents) style values.
Expand Down