Social Links: Allow icon size to be reset and honor theme.json styles#70380
Conversation
|
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @EldarAgalarov. 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. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
t-hamano
left a comment
There was a problem hiding this comment.
LGTM! I believe this is the ideal approach to solve the fundamental problem.
…WordPress#70380) Unlinked contributors: EldarAgalarov. Co-authored-by: karthikeya-io <karthikeya01@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org>
What?
Closes #70318
This PR updates the SocialLinksEdit component to:
undefinedin the size attribute instead of hardcodinghas-normal-icon-sizehas-normal-icon-sizeclass.Why?
Currently, when the icon size is set and reset, the
has-normal-icon-sizeclass remains in the markup. This overrides custom styles set via theme.json or additional CSS due to higher specificity.By introducing an explicit "Default" option that doesn't apply a class, this change ensures the block respects styles defined in theme.json. It also improves clarity in the UI, indicating when the default size is being used.
How?
Testing Instructions
Testing Instructions for Keyboard
Same
Screenshots or screencast
When the following style is added to theme.json
After Icon size is reset