-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Button Block: Can't set typography #64662
Comments
Confirmed, I can also reproduce this. It looks like the block styles apply to the button wrapper I tested 6.5, and it was the same in that version, so it doesn't seem to be a new bug. |
@talldan hit the nail on the head. Global styles for the button block type will also target the inner element. The button block seems to have some ad hoc styles to force inheritance but they don't seem to cover all typography styles. For example: .wp-block-button[style*=font-weight] .wp-block-button__link {
font-weight: inherit;
} There might be two options for a fix;
Option 1 might be the simplest but would need to be updated for any new typography supports added in the future. |
@talldan or @aaronrobertshaw |
Fixes #64662. The current typography does not work correctly with the given Core Button block styles. This fix forces inner elements to inherit the styles with the exception of `writingMode` which is set on the block wrapper. Co-authored-by: shimotmk <[email protected]> Co-authored-by: ramonjd <[email protected]> Co-authored-by: aaronrobertshaw <[email protected]> Co-authored-by: talldan <[email protected]>
Fixes WordPress#64662. The current typography does not work correctly with the given Core Button block styles. This fix forces inner elements to inherit the styles with the exception of `writingMode` which is set on the block wrapper. Co-authored-by: shimotmk <[email protected]> Co-authored-by: ramonjd <[email protected]> Co-authored-by: aaronrobertshaw <[email protected]> Co-authored-by: talldan <[email protected]>
Description
If typography is set for the button element in theme.json, the settings in the block will not work.
Step-by-step reproduction instructions
You can see that the Appearance has not changed in either the editor screen or the front screen.
Screenshots, screen recording, code snippet
Environment info
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
The text was updated successfully, but these errors were encountered: