mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Summary: This adds: 1. `CSSValueVariant`: A union-y type, mapping to a collection of CSS basic data types, and a set of allowed keywords. The aim here is to more closely model the data types after the CSS spec, to allow RN to store them correctly, while not taking up too much space. These types will form the foundation of Yoga prop storage (and probably some other props down the line), so compactness is a priority. 2. `parseCSSValue()`: This uses the previously added Tokenizer, along with parsing rules, to be able to parse a single component value, into a literal keyword, `<length>`, `<length-percentage>`, `<percentage>`, or `<number>`. This will be wired to the props parsing infrastructure. See D53461299 for an example of what this will look like in props storage. Changelog: [Internal] Reviewed By: rozele Differential Revision: D53342595 fbshipit-source-id: 3f00dfd7c0ead3dbef4605a61e9859cf69945fe5