-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[WIP] Style engine: add elements and states to the backend #41619
Closed
+227
−41
Closed
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
f0b30b5
Initial commit.
ramonjd 127bc76
Lint and other stuff zzzz
ramonjd 4ced1d5
Removed unused `value_func`
ramonjd caeade2
Testing adding button element and transition states.
ramonjd a741fae
Add support for focus for links and disabled for buttons
getdave 2608e32
Update tests to assert on focus and disabled state styles
getdave 862ef25
DRY up by dynamically generating state definitions
getdave 94e3a78
Hack: Filter safe CSS rules to enable transition
getdave f98e4c8
Update data model to remove the states key
getdave 9448577
Simplify: remove transitions
getdave a0037a0
Remove everything that is not a link with :hover
getdave 66a0276
Remove changes to file
getdave 037b923
Remove button element from definition list.
ramonjd 99d836f
Updating elements to account for the fact that the style engine contr…
ramonjd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we start introducing more elements and element styles, we'll have to rebuild each element with "skip serialization" checks for all their style properties.
TODO: add a comment to the code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeh I noticed. I'd like to understand more about why link color serlization is potentially skipped. What's the deal there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a block supports feature introduced a while back. With it, you can specify at the block.json level whether a block receives a particular style.
See: