-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Social Links Block: Prevent Theme Styles Distorting Size #56301
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a feeling this is the main part of the fix, but I'm also not sure. Can you speak a bit more about what this does? In the editor we do use some pseudo elements to display focus styles, just want to make sure we don't regress that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @jasmussen - no, the
padding
andmargin
is the main part of the fix which covers most themes. However, at least two themes which I tested also set an:after
in the widget area (eg. see Apostrophe 2 in Automattic/themes#7062).I feel that more than enough themes are affected to justify the
padding
andmargin
styles in Core, but I don’t mind particularly either way on this bit. However, since we already have a selector, I suspect that it’s probably easier for users and developers than hoping that themes update their styling for this block.I hope that makes sense, and thanks for the review! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix is definitely valid, my question is mostly around this pseudo element. Do you know where this code is coming from?
If it's reproducible in core on more than just one theme, for example with social icons in widgets on every theme that has widget areas, then the fix is definitely appropriate for core.
But if the CSS that appends a | is coming from a theme or a plugin, then it should not be fixed here, it should be fixed at the source. Makes sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense! A few themes are guilty of similar styling, but yes, it's from the theme: https://github.com/Automattic/themes/blob/012258cc65cfdfc99bc32117ef951f2c9dbb7189/apostrophe-2/style.css#L1411-L1415
I don't have a strong view either way as to whether there's enough themes affected to justify a Core fix, so I've removed that style from this PR - I'll fix it in the individual themes instead. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for removing. It's definitely important to not fix at the source, because like I said in some cases we use the pseudo selectors for other things, so this'll have to be a local fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes total sense! Please let me know if there are any issues with the remaining changes. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, hopefully @apeatling can give it a green check!