Make WordPress Core


Ignore:
Timestamp:
03/24/2026 05:56:12 AM (6 months ago)
Author:
audrasjb
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/nav-menu.php

    r61454 r62097  
    364364                <input type="hidden" value="custom" name="menu-item[<?php echo $_nav_menu_placeholder; ?>][menu-item-type]" />
    365365                <p id="menu-item-url-wrap" class="wp-clearfix">
    366                         <label class="howto" for="custom-menu-item-url"><?php _e( 'URL' ); ?></label>
     366                        <label for="custom-menu-item-url"><?php _e( 'URL' ); ?></label>
    367367                        <input id="custom-menu-item-url" name="menu-item[<?php echo $_nav_menu_placeholder; ?>][menu-item-url]"
    368368                                type="text"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?>
    … …  
    373373
    374374                <p id="menu-item-name-wrap" class="wp-clearfix">
    375                         <label class="howto" for="custom-menu-item-name"><?php _e( 'Link Text' ); ?></label>
     375                        <label for="custom-menu-item-name"><?php _e( 'Link Text' ); ?></label>
    376376                        <input id="custom-menu-item-name" name="menu-item[<?php echo $_nav_menu_placeholder; ?>][menu-item-title]"
    377377                                type="text"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?>
    … …  
    380380                </p>
    381381
    382                 <p class="button-controls wp-clearfix">
     382                <p class="button-controls button-controls-customlinkdiv">
    383383                        <span class="add-to-menu">
    384384                                <input id="submit-customlinkdiv" name="add-custom-menu-item"
    … …  
    821821                </div><!-- /.tabs-panel -->
    822822
    823                 <p class="button-controls wp-clearfix" data-items-type="<?php echo esc_attr( "posttype-{$post_type_name}" ); ?>">
     823                <p class="button-controls" data-items-type="<?php echo esc_attr( "posttype-{$post_type_name}" ); ?>">
    824824                        <span class="list-controls hide-if-no-js">
    825825                                <input type="checkbox"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?>
    … …  
    11161116                </div><!-- /.tabs-panel -->
    11171117
    1118                 <p class="button-controls wp-clearfix" data-items-type="<?php echo esc_attr( "taxonomy-{$taxonomy_name}" ); ?>">
     1118                <p class="button-controls" data-items-type="<?php echo esc_attr( "taxonomy-{$taxonomy_name}" ); ?>">
    11191119                        <span class="list-controls hide-if-no-js">
    11201120                                <input type="checkbox"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?>
Note: See TracChangeset for help on using the changeset viewer.