react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Add CSSProp and CSSPropDefinition

Open NickGerleman opened this issue 2 years ago • 1 comments

Summary: This structures properties into a CSSProp enum (so that we can have a runtime-key per style prop), associated with a CSSPropDefinition structure which groups the supported types and keywords. This has some niceness of removing the macro bits, but more importantly, means we can query parse related information without a field of the value yet existing (need for sparse storage of CSS values). In the future, it will serve as where we define "initial" values, and likely, the processes for interpolation and inheritance.

We restructure CSSValueVariant to not always support keywords, as it may not be a valid possibility for computed values (which do not have CSS wide keywords). Computed values themselves may also reduce more keywords than the global ones (e.g. border width computed value absolutizes keywords).

We also flesh out more of the prop definitions, and parsing. All the properties here relay back to YogaStylableProps of today, but I intentionally filled out the prop definitions a bit more than we do anything with right now (will design higher level to ignore unknown props).

Changelog: [Internal]

Differential Revision: D53518450

NickGerleman avatar Feb 07 '24 14:02 NickGerleman

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

facebook-github-bot avatar Feb 07 '24 14:02 facebook-github-bot

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

facebook-github-bot avatar Feb 14 '24 00:02 facebook-github-bot

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

facebook-github-bot avatar Feb 14 '24 00:02 facebook-github-bot

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

facebook-github-bot avatar Feb 14 '24 01:02 facebook-github-bot

This pull request has been merged in facebook/react-native@c37fc74212beac79ddcf63b49b350b2dea43f371.

facebook-github-bot avatar Feb 14 '24 04:02 facebook-github-bot