-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Social Links: Add ability to change social icon sizes #25921
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
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
efb0619
Social Links: Add variables to change icon sizes
mkaz c915b1c
Switch social links to fixed sizes
mkaz f20bb66
Ensure that icons aren't cut off by their button container in the edi…
kjellr fda190f
Switch size control to toolbar
mkaz 2ae7ea1
Add check icon for selected menuitem
mkaz 8b32cd2
Add isAlternate prop for Dropdown
mkaz 712ba4e
Initial refactor work.
jasmussen 0ac9731
Refactor to use ems.
jasmussen 2881e59
Small tweaks.
jasmussen e67758d
Fix variations.
jasmussen f153efc
Get the setup state working.
jasmussen fb5a053
Don't size up placeholder state on hover.
jasmussen dd0b88a
Add checkmark to normal size even if not set
mkaz fcf9e1c
Use math for nicer padding. Props @kirilzh
jasmussen cb1a1fc
Add specificity to margins to fix a theme issue.
jasmussen 613fd3d
iconSize -> size
jasmussen 6b33a86
Hover cleanup.
jasmussen 26abaa3
Try using DropdownMenu component
mkaz 17c20ed
Fix calc.
jasmussen dd1b761
Try text for button instead of icon
mkaz 3a3f1f5
Add popover props for isAlternate
mkaz 63aeff1
Display size name as label
mkaz c550580
Switch back to 'Size' in toolbar
mkaz 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 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,20 @@ | ||
| .wp-block-social-links .wp-social-link button { | ||
| color: currentColor; | ||
| padding: 6px; | ||
| // The editor uses the button component, the frontend uses a link. | ||
| // Therefore we unstyle the button component to make it more like the frontend. | ||
| .wp-block-social-links .wp-social-link { | ||
| line-height: 0; | ||
|
|
||
| button { | ||
| font-size: inherit; | ||
| color: currentColor; | ||
| height: auto; | ||
| line-height: 0; | ||
|
|
||
| // This rule is duplicated from the style.scss and needs to be the same as there. | ||
| padding: 0.25em; | ||
| } | ||
| } | ||
|
|
||
| .wp-block-social-links.is-style-pill-shape .wp-social-link button { | ||
| padding-left: 16px; | ||
| padding-right: 16px; | ||
| padding-left: calc((2/3) * 1em); | ||
| padding-right: calc((2/3) * 1em); | ||
| } |
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
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
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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.