Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/wp-admin/css/customize-controls.css
Original file line number Diff line number Diff line change
Expand Up @@ -2493,12 +2493,18 @@ body.cheatin p {
* Widgets and Menus common styles
*/

.customize-control-widgets-buttons {
display: flex;
justify-content: flex-end;
align-items: center;
gap: 8px;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should use a gap: 8px; for consistency with the Nav menus buttons.
Also, we should clean up a little and remove the float: right; for these buttons that is set in customize-controls.css.


/* higher specificity than .wp-core-ui .button */
#customize-theme-controls .add-new-widget,
#customize-theme-controls .add-new-menu-item {
cursor: pointer;
float: right;
margin: 0 0 0 10px;
margin: 0;
transition: all 0.2s;
-webkit-user-select: none;
user-select: none;
Expand Down Expand Up @@ -2530,7 +2536,6 @@ body.cheatin p {

/* Reordering */
.reorder-toggle {
float: right;
padding: 5px 8px;
text-decoration: none;
cursor: pointer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,15 @@ public function to_json() {
public function render_content() {
$id = 'reorder-widgets-desc-' . str_replace( array( '[', ']' ), array( '-', '' ), $this->id );
?>
<button type="button" class="button add-new-widget" aria-expanded="false" aria-controls="available-widgets">
<?php _e( 'Add a Widget' ); ?>
</button>
<button type="button" class="button-link reorder-toggle" aria-label="<?php esc_attr_e( 'Reorder widgets' ); ?>" aria-describedby="<?php echo esc_attr( $id ); ?>">
<span class="reorder"><?php _e( 'Reorder' ); ?></span>
<span class="reorder-done"><?php _e( 'Done' ); ?></span>
</button>
<div class="customize-control-widgets-buttons">
<button type="button" class="button-link reorder-toggle" aria-label="<?php esc_attr_e( 'Reorder widgets' ); ?>" aria-describedby="<?php echo esc_attr( $id ); ?>">
<span class="reorder"><?php _e( 'Reorder' ); ?></span>
<span class="reorder-done"><?php _e( 'Done' ); ?></span>
</button>
<button type="button" class="button add-new-widget" aria-expanded="false" aria-controls="available-widgets">
<?php _e( 'Add a Widget' ); ?>
</button>
</div>
<p class="screen-reader-text" id="<?php echo esc_attr( $id ); ?>">
<?php
/* translators: Hidden accessibility text. */
Expand Down
Loading