-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow representing function component values #44470
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
facebook-github-bot
added
the
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
label
May 8, 2024
This pull request was exported from Phabricator. Differential Revision: D57089275 |
Summary: Every CSS prop at this sparse stage is represented as an enum, and each enum can be specialized to different types, according to the global CSS property table. With this change, we add a string name to each property table entry that we use to generate a function to be able to set CSS value strings, against property name strings. Like `declaredStyle.set("aspectRatio", "4 / 3")`. I was considering specializing this a bit, to allow DeclaredStyles which only support a subset of CSS props. E.g. so `ParagraphShadowNode` has a more derived declared style than `LayoutableShadowNode` does. But, I am not sure the best way yet to make that compose nicely. Changelog: [internal] Reviewed By: rshest Differential Revision: D57039255
…ebook#44450) Summary: Adding some of the tokenization needed for things like `transform` and `filter`. Parsing will be a bit trickier with the model currently built up. Changelog: [Internal] Differential Revision: D57047886
Summary: Need to make the current headers a bit more granular to avoid cyclical dependencies, and a lot of bloat. This code isn't wired up more broadly, so this isn't breaking yet. Changelog: [Internal] Reviewed By: rshest Differential Revision: D57089140
Summary: CSS component values, as defined in the syntax spec, are either "preserved tokens", CSS functions, or simple blocks. This is distinct from the higher-level "component value type" specified in the [values and units](https://www.w3.org/TR/css-values-3/#component-types) spec. I was previously short-circuiting a bit, from preserved tokens, to a higher level data structure. This separates them out, adding a layer exposing the preserved token, and now a `CSSParser::FunctionComponentValue`, which can represent a named function and its nested component values. This does not yet wire functions beyond CSSParser returned component values. Changelog: [Internal] Differential Revision: D57089275
NickGerleman
force-pushed
the
export-D57089275
branch
from
May 8, 2024 07:20
0782c3c
to
1521175
Compare
This pull request was exported from Phabricator. Differential Revision: D57089275 |
Base commit: deee037 |
This pull request has been merged in a37111a. |
This pull request was successfully merged by @NickGerleman in a37111a. When will my fix make it into a release? | How to file a pick request? |
kosmydel
pushed a commit
to kosmydel/react-native
that referenced
this pull request
Jun 11, 2024
Summary: Pull Request resolved: facebook#44470 CSS component values, as defined in the syntax spec, are either "preserved tokens", CSS functions, or simple blocks. This is distinct from the higher-level "component value type" specified in the [values and units](https://www.w3.org/TR/css-values-3/#component-types) spec. I was previously short-circuiting a bit, from preserved tokens, to a higher level data structure. This separates them out, adding a layer exposing the preserved token as `CSSSyntaxParser::Token`, and now a `CSSSyntaxParser::Function`, which can represent a named function and its nested component values. This does not yet wire functions beyond CSSParser returned component values. Changelog: [Internal] Reviewed By: rshest Differential Revision: D57089275 fbshipit-source-id: 97eeb1a7b3363c79d99f9419ba6e022c4c3c31d0
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
CSS component values, as defined in the syntax spec, are either "preserved tokens", CSS functions, or simple blocks. This is distinct from the higher-level "component value type" specified in the values and units spec.
I was previously short-circuiting a bit, from preserved tokens, to a higher level data structure. This separates them out, adding a layer exposing the preserved token, and now a
CSSParser::FunctionComponentValue
, which can represent a named function and its nested component values.This does not yet wire functions beyond CSSParser returned component values.
Changelog: [Internal]
Differential Revision: D57089275