| 65 | } |
| 66 | |
| 67 | std::optional<YGFlexDirection> mapFlexDirection(std::string_view flexDirection) { |
| 68 | switch (Switch::hash(flexDirection)) { |
| 69 | case "column"_hash: return YGFlexDirectionColumn; |
| 70 | case "row"_hash: return YGFlexDirectionRow; |
| 71 | case "column-reverse"_hash: return YGFlexDirectionColumnReverse; |
| 72 | case "row-reverse"_hash: return YGFlexDirectionRowReverse; |
| 73 | } |
| 74 | Warn("invalid CSS FlexDirection: \"{}\", should be one of \"column\", \"row\", \"column-reverse\" and \"row-reverse\"", flexDirection); |
| 75 | return std::nullopt; |
| 76 | } |
| 77 | |
| 78 | std::optional<YGJustify> mapJustifyContent(std::string_view justifyContent) { |
| 79 | switch (Switch::hash(justifyContent)) { |