Open Mayank-Tripathi32 opened 2 days ago
:wave: Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @Mayank-Tripathi32! In case you missed it, we'd love to have you join us in our Slack community.
If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.
Warning: Type of PR label mismatch
To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot
label.
The following contributors have not linked their GitHub and WordPress.org accounts: @CallMarl.
Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.
If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
Unlinked contributors: CallMarl.
Co-authored-by: Mayank-Tripathi32 <mayanktripathi32@git.wordpress.org>
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.
resolves #67133
What?
This PR addresses issue #67133 by adding the .wp-block-social-link-anchor class to the a:where(:not()) specifier in the CSS generated by the Gutenberg block editor.
Why?
Currently, the global font size settings override custom font sizes defined within the Social Links block. This issue arises due to the order of CSS rules being applied. To resolve this, the native block class .wp-block-social-link-anchor must be included in the CSS selector to prevent the global styles from interfering with the Social Links block styles.
How?
The PR updates the WP_Theme_JSON_Gutenberg file by modifying the link key value from:
to:
This change ensures that the global font size settings do not apply to Social Links, allowing the block-specific styles to take precedence.
Testing Instructions
Set Up the Environment:
theme.json
file to define a global font size for links:Open the Gutenberg Editor:
Insert a Social Links Block:
Set a Custom Font Size for Social Links:
Check the Font Size Behavior:
theme.json
.Apply the PR Changes:
WP_Theme_JSON_Gutenberg
file as follows:Retest the Behavior:
Verify No Regressions: