* Fallback alignment to use on overflow * https://www.w3.org/TR/css-align-3/#distribution-values */
| 42 | * https://www.w3.org/TR/css-align-3/#distribution-values |
| 43 | */ |
| 44 | constexpr 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 |
no outgoing calls
no test coverage detected