Make WordPress Core

Changeset 36171 for trunk


Ignore:
Timestamp:
01/05/2016 01:37:56 PM (9 years ago)
Author:
afercia
Message:

Introduce a new generic CSS clearfix utility class.

.wp-clearfix is now the recommended way to clear and contain floated elements.
Adds back compatibility for the .nav-tab-wrapper navigation tabs.

See #26396.

Location:
trunk/src/wp-admin
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/about.php

    r35839 r36171  
    4343        <div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
    4444
    45         <h2 class="nav-tab-wrapper">
     45        <h2 class="nav-tab-wrapper wp-clearfix">
    4646            <a href="about.php" class="nav-tab nav-tab-active"><?php _e( 'What&#8217;s New' ); ?></a>
    4747            <a href="credits.php" class="nav-tab"><?php _e( 'Credits' ); ?></a>
  • trunk/src/wp-admin/credits.php

    r35898 r36171  
    2525<div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
    2626
    27 <h2 class="nav-tab-wrapper">
     27<h2 class="nav-tab-wrapper wp-clearfix">
    2828    <a href="about.php" class="nav-tab"><?php _e( 'What&#8217;s New' ); ?></a>
    2929    <a href="credits.php" class="nav-tab nav-tab-active"><?php _e( 'Credits' ); ?></a>
  • trunk/src/wp-admin/css/common.css

    r36053 r36171  
    112112
    113113.clear {
     114    clear: both;
     115}
     116
     117/* modern clearfix */
     118.wp-clearfix:after {
     119    content: "";
     120    display: table;
    114121    clear: both;
    115122}
     
    20612068    border-bottom: 1px solid #ccc;
    20622069    margin: 0;
    2063     padding: 9px 15px 0 0;
     2070    padding-top: 9px;
    20642071    line-height: inherit;
    20652072}
    20662073
    2067 /* contain floats */
    2068 .nav-tab-wrapper:after {
    2069     content: "";
    2070     display: table;
    2071     clear: both;
     2074/* Back-compat for plugins. Deprecated. Use .wp-clearfix instead. */
     2075.nav-tab-wrapper:not(.wp-clearfix):after {
     2076    content: "";
     2077    display: table;
     2078    clear: both;
     2079 }
     2080
     2081.ie8 .nav-tab-wrapper {
     2082    /* contain floats establishing a new block formatting context */
     2083    display: inline-block;
     2084    width: 100%;
     2085    vertical-align: top;
    20722086}
    20732087
     
    36363650    .wrap h2.nav-tab-wrapper,
    36373651    h3.nav-tab-wrapper {
    3638         padding-left: 0;
    36393652        border-bottom: 0;
    36403653    }
     
    36433656    h2 .nav-tab,
    36443657    h3 .nav-tab {
    3645         margin-top: 10px;
    3646         margin-right: 10px;
     3658        margin: 10px 10px 0 0;
    36473659        border-bottom: 1px solid #ccc;
    36483660    }
  • trunk/src/wp-admin/freedoms.php

    r35812 r36171  
    2424<div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
    2525
    26 <h2 class="nav-tab-wrapper">
     26<h2 class="nav-tab-wrapper wp-clearfix">
    2727    <a href="about.php" class="nav-tab"><?php _e( 'What&#8217;s New' ); ?></a>
    2828    <a href="credits.php" class="nav-tab"><?php _e( 'Credits' ); ?></a>
  • trunk/src/wp-admin/nav-menus.php

    r35722 r36171  
    585585        ?>
    586586    </h1>
    587     <h2 class="nav-tab-wrapper">
     587    <h2 class="nav-tab-wrapper wp-clearfix">
    588588        <a href="<?php echo admin_url( 'nav-menus.php' ); ?>" class="nav-tab<?php if ( ! isset( $_GET['action'] ) || isset( $_GET['action'] ) && 'locations' != $_GET['action'] ) echo ' nav-tab-active'; ?>"><?php esc_html_e( 'Edit Menus' ); ?></a>
    589589        <?php if ( $num_locations && $menu_count ) : ?>
  • trunk/src/wp-admin/network/site-info.php

    r34913 r36171  
    139139<h1 id="edit-site"><?php echo $title; ?></h1>
    140140<p class="edit-site-actions"><a href="<?php echo esc_url( get_home_url( $id, '/' ) ); ?>"><?php _e( 'Visit' ); ?></a> | <a href="<?php echo esc_url( get_admin_url( $id ) ); ?>"><?php _e( 'Dashboard' ); ?></a></p>
    141 <h2 class="nav-tab-wrapper nav-tab-small">
     141<h2 class="nav-tab-wrapper nav-tab-small wp-clearfix">
    142142<?php
    143143$tabs = array(
  • trunk/src/wp-admin/network/site-settings.php

    r34913 r36171  
    9696<h1 id="edit-site"><?php echo $title; ?></h1>
    9797<p class="edit-site-actions"><a href="<?php echo esc_url( get_home_url( $id, '/' ) ); ?>"><?php _e( 'Visit' ); ?></a> | <a href="<?php echo esc_url( get_admin_url( $id ) ); ?>"><?php _e( 'Dashboard' ); ?></a></p>
    98 <h2 class="nav-tab-wrapper nav-tab-small">
     98<h2 class="nav-tab-wrapper nav-tab-small wp-clearfix">
    9999<?php
    100100$tabs = array(
  • trunk/src/wp-admin/network/site-themes.php

    r34913 r36171  
    150150<h1 id="edit-site"><?php echo $title; ?></h1>
    151151<p class="edit-site-actions"><a href="<?php echo esc_url( get_home_url( $id, '/' ) ); ?>"><?php _e( 'Visit' ); ?></a> | <a href="<?php echo esc_url( get_admin_url( $id ) ); ?>"><?php _e( 'Dashboard' ); ?></a></p>
    152 <h2 class="nav-tab-wrapper nav-tab-small">
     152<h2 class="nav-tab-wrapper nav-tab-small wp-clearfix">
    153153<?php
    154154$tabs = array(
  • trunk/src/wp-admin/network/site-users.php

    r34913 r36171  
    205205<h1 id="edit-site"><?php echo $title; ?></h1>
    206206<p class="edit-site-actions"><a href="<?php echo esc_url( get_home_url( $id, '/' ) ); ?>"><?php _e( 'Visit' ); ?></a> | <a href="<?php echo esc_url( get_admin_url( $id ) ); ?>"><?php _e( 'Dashboard' ); ?></a></p>
    207 <h2 class="nav-tab-wrapper nav-tab-small">
     207<h2 class="nav-tab-wrapper nav-tab-small wp-clearfix">
    208208<?php
    209209$tabs = array(
Note: See TracChangeset for help on using the changeset viewer.