File Block: Makes the button an element button#41239
Merged
Conversation
|
Size Change: +25 B (0%) Total Size: 1.24 MB
ℹ️ View Unchanged
|
0d0906d to
1d4c945
Compare
Contributor
|
I'm getting specificity issues here too using Blockbase with this PR: |
This was referenced May 26, 2022
Contributor
|
There's also a missing block deprecation here (extra classname for the file block). Please can you ensure that all the blocks that had support for all these new elements (new classnames) have the needed deprecations. See #45153 |
Contributor
Author
|
Deprecation added here: #45159 I'll follow up with the others shortly. |
Contributor
|
Thanks @scruffian |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

What?
Makes the button in the file block a button element.
Why?
This enables themes to target the button in file blocks without custom CSS.
How?
Adds the experimental class name to the button. The shortcoming of the approach is that it won't work for blocks that have already been serialised. The alternative approach is to add the file block button class name to the list of selectors in the element selector, but this will cause bloat to this selector which we will need to support forever.
This approach is a compromise which will work for newly added form blocks, but not existing ones.
Testing Instructions
Screenshots or screencast
cc @WordPress/block-themers