Menus: Remove floats from custom links section in the Nav Menus screen.

With the new admin design, there were some issues with floating elements in the custom links section of the classic Menu screen. This changeset simplifies the CSS implementation by removing floats and `wp-clearfix` classes from some elements in favor of a more robust implementation based on flex positionning.

Props audrasjb, huzaifaalmesbah, shailu25, nikunj8866, joedolson, khushi1501, ozgursar.
Fixes #64692.
See #64308.


Built from https://develop.svn.wordpress.org/trunk@62097


git-svn-id: http://core.svn.wordpress.org/trunk@61379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
audrasjb
2026-03-24 05:57:59 +00:00
parent 94ac2d4d66
commit 0c97fcf5ed
6 changed files with 26 additions and 24 deletions

View File

@@ -376,17 +376,11 @@ input.bulk-select-switcher:focus + .bulk-select-button-label {
}
/* Add Menu Item Boxes */
.postbox .howto input,
.customlinkdiv .menu-item-textbox,
.customlinkdiv .error-message {
.postbox .howto input {
width: 180px;
float: left;
}
.customlinkdiv .error-message {
clear: left;
}
.accordion-container .outer-border {
margin: 0;
}
@@ -478,7 +472,10 @@ input.bulk-select-switcher:focus + .bulk-select-button-label {
width: 180px;
}
.customlinkdiv label,
.customlinkdiv .menu-item-textbox {
width: 100%;
}
.nav-menus-php .howto span {
float: right;
margin-top: 6px;
@@ -877,6 +874,10 @@ body.menu-max-depth-11 { min-width: 1280px !important; }
justify-content: space-between;
}
.button-controls-customlinkdiv {
justify-content: flex-end;
}
/* =Media Queries
-------------------------------------------------------------- */

File diff suppressed because one or more lines are too long

View File

@@ -375,17 +375,11 @@ input.bulk-select-switcher:focus + .bulk-select-button-label {
}
/* Add Menu Item Boxes */
.postbox .howto input,
.customlinkdiv .menu-item-textbox,
.customlinkdiv .error-message {
.postbox .howto input {
width: 180px;
float: right;
}
.customlinkdiv .error-message {
clear: right;
}
.accordion-container .outer-border {
margin: 0;
}
@@ -477,7 +471,10 @@ input.bulk-select-switcher:focus + .bulk-select-button-label {
width: 180px;
}
.customlinkdiv label,
.customlinkdiv .menu-item-textbox {
width: 100%;
}
.nav-menus-php .howto span {
float: left;
margin-top: 6px;
@@ -876,6 +873,10 @@ body.menu-max-depth-11 { min-width: 1280px !important; }
justify-content: space-between;
}
.button-controls-customlinkdiv {
justify-content: flex-end;
}
/* =Media Queries
-------------------------------------------------------------- */

File diff suppressed because one or more lines are too long

View File

@@ -363,7 +363,7 @@ function wp_nav_menu_item_link_meta_box() {
<div class="customlinkdiv" id="customlinkdiv">
<input type="hidden" value="custom" name="menu-item[<?php echo $_nav_menu_placeholder; ?>][menu-item-type]" />
<p id="menu-item-url-wrap" class="wp-clearfix">
<label class="howto" for="custom-menu-item-url"><?php _e( 'URL' ); ?></label>
<label for="custom-menu-item-url"><?php _e( 'URL' ); ?></label>
<input id="custom-menu-item-url" name="menu-item[<?php echo $_nav_menu_placeholder; ?>][menu-item-url]"
type="text"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?>
class="code menu-item-textbox form-required" placeholder="https://"
@@ -372,14 +372,14 @@ function wp_nav_menu_item_link_meta_box() {
</p>
<p id="menu-item-name-wrap" class="wp-clearfix">
<label class="howto" for="custom-menu-item-name"><?php _e( 'Link Text' ); ?></label>
<label for="custom-menu-item-name"><?php _e( 'Link Text' ); ?></label>
<input id="custom-menu-item-name" name="menu-item[<?php echo $_nav_menu_placeholder; ?>][menu-item-title]"
type="text"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?>
class="regular-text menu-item-textbox"
/>
</p>
<p class="button-controls wp-clearfix">
<p class="button-controls button-controls-customlinkdiv">
<span class="add-to-menu">
<input id="submit-customlinkdiv" name="add-custom-menu-item"
type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?>
@@ -820,7 +820,7 @@ function wp_nav_menu_item_post_type_meta_box( $data_object, $box ) {
<?php endif; ?>
</div><!-- /.tabs-panel -->
<p class="button-controls wp-clearfix" data-items-type="<?php echo esc_attr( "posttype-{$post_type_name}" ); ?>">
<p class="button-controls" data-items-type="<?php echo esc_attr( "posttype-{$post_type_name}" ); ?>">
<span class="list-controls hide-if-no-js">
<input type="checkbox"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?>
id="<?php echo esc_attr( $tab_name ); ?>" class="select-all"
@@ -1115,7 +1115,7 @@ function wp_nav_menu_item_taxonomy_meta_box( $data_object, $box ) {
</ul>
</div><!-- /.tabs-panel -->
<p class="button-controls wp-clearfix" data-items-type="<?php echo esc_attr( "taxonomy-{$taxonomy_name}" ); ?>">
<p class="button-controls" data-items-type="<?php echo esc_attr( "taxonomy-{$taxonomy_name}" ); ?>">
<span class="list-controls hide-if-no-js">
<input type="checkbox"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?>
id="<?php echo esc_attr( $tab_name ); ?>" class="select-all"

View File

@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '7.0-beta6-62096';
$wp_version = '7.0-beta6-62097';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.