Skip to content

Add <ratio> support to CSSValueVariant and parseCSSValue()#42879

Closed
NickGerleman wants to merge 3 commits into
facebook:mainfrom
NickGerleman:export-D53457930
Closed

Add <ratio> support to CSSValueVariant and parseCSSValue()#42879
NickGerleman wants to merge 3 commits into
facebook:mainfrom
NickGerleman:export-D53457930

Conversation

@NickGerleman

Copy link
Copy Markdown
Contributor

Summary:
Adds support for parsing and storing a component value of the CSS basic data type. This would allow removing processAspectRatio from viewconfigs later, which we would need for correct substitution of functions/expressions resulting in the ratio numerator/denominator.

Changelog: [Internal]

Differential Revision: D53457930

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Feb 6, 2024
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D53457930

@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D53457930

@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D53457930

@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D53457930

@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D53457930

@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D53457930

NickGerleman and others added 3 commits February 13, 2024 16:41
Differential Revision: D53377527,

fbshipit-source-id: eb4945e9d9a6edee0b3c8b46ffb493fee0428fbb
Summary:
This adds:
1. `CSSValue`: A union-y type, mapping to a collection of CSS data types. 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>`, `<percent>`, or `<number>`. This will be wired to the props parsing infrastructure.

Changelog: [Internal]

Differential Revision: D53342595

fbshipit-source-id: d30e5fc36fe6c4ea9f121ab4c5788cd01fd3e4c1
…parseCSSValue() (facebook#42879)

Summary:
Pull Request resolved: facebook#42879

Adds support for parsing and storing a component value of the <ratio> CSS basic data type. This would allow removing  from viewconfigs later, which we would need for correct substitution of functions/expressions resulting in the ratio numerator/denominator.

This also fleshes out the parser a bit more, and does some renaming, and convention setting.

Changelog: [Internal]

Reviewed By: rozele

Differential Revision: D53457930

fbshipit-source-id: d5dc240218ec5ab960f8347729e01dafb1790a9f
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D53457930

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Feb 14, 2024
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request has been merged in a8f239d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants