-
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
Add Items Justification to Social Links #28980
Conversation
Size Change: +3.9 kB (0%) Total Size: 1.38 MB
ℹ️ View Unchanged
|
} = props; | ||
|
||
const className = classNames( size, { | ||
'has-icon-color': iconColorValue, | ||
'has-icon-background-color': iconBackgroundColorValue, | ||
[ `items-justified-${ itemsJustification }` ]: itemsJustification, |
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.
Did we discuss the naming of this CSS class? I seem to vaguely recall that we did, but can't recall where we ended. I would've probably preferred something like has-justification-left
— but maybe there was already an existing CSS class out in the wild?
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.
All looked cool right up until the end (and removing the flex-start seems fine). Before:
After:
However it doesn't work on the frontend: this should be "space between":
It also looks like the flex-start is still output by default on the frontend:
It looks like the items justification CSS is not output on the frontend at all.
I have no idea why, because the code looks right.
@jasmussen I added the justification CSS to the common.scss for block-library and it all works as expected. |
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.
Description
Adds justify toolbar controls to Social Links, allows for justifying items in the menu (left, center, right, and space-between). This matches the navigation and buttons features.
@jasmussen - the .wp-social-links class was hard-coded with a
justify-content: flex-start;
that I removed to get this to work. I'm not sure if we need it sinceflex-start
is the default.How has this been tested?
Screenshots
Types of changes