MCPcopy Create free account
hub / github.com/Snapchat/Valdi / fallbackAlignment

Function fallbackAlignment

third-party/yoga/src/yoga/algorithm/Align.h:44–59  ·  view source on GitHub ↗

* Fallback alignment to use on overflow * https://www.w3.org/TR/css-align-3/#distribution-values */

Source from the content-addressed store, hash-verified

42 * https://www.w3.org/TR/css-align-3/#distribution-values
43 */
44constexpr Align fallbackAlignment(Align align) {
45 switch (align) {
46 // Fallback to flex-start
47 case Align::SpaceBetween:
48 case Align::Stretch:
49 return Align::FlexStart;
50
51 // Fallback to safe center. TODO (T208209388): This should be aligned to
52 // Start instead of FlexStart (for row-reverse containers)
53 case Align::SpaceAround:
54 case Align::SpaceEvenly:
55 return Align::FlexStart;
56 default:
57 return align;
58 }
59}
60
61/**
62 * Fallback alignment to use on overflow

Callers 2

justifyMainAxisFunction · 0.85
calculateLayoutImplFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected