Make WordPress Core


Ignore:
Timestamp:
01/14/2015 10:13:03 PM (10 years ago)
Author:
helen
Message:

List tables: Use CSS :nth-child() selectors for zebra striping.

Note that this does not fix issues related to comment quick edit. Internal linking also continues to use the .alternate class for now. IE8 and below gracefully degrade by not having zebra striping.

There is some hoop jumping with adding an extra table row to maintain zebra striping during quick edit. Documenting that here for future reference; it is also in the inline documentation.

fixes #30981 and #26060. see #25060.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-links-list-table.php

    r30754 r31181  
    112112        global $cat_id;
    113113
    114         $alt = 0;
    115 
    116114        foreach ( $this->items as $link ) {
    117115            $link = sanitize_bookmark( $link );
     
    123121            $visible = ( $link->link_visible == 'Y' ) ? __( 'Yes' ) : __( 'No' );
    124122            $rating  = $link->link_rating;
    125             $style = ( $alt++ % 2 ) ? '' : ' class="alternate"';
    126123
    127124            $edit_link = get_edit_bookmark_link( $link );
    128125?>
    129         <tr id="link-<?php echo $link->link_id; ?>" <?php echo $style; ?>>
     126        <tr id="link-<?php echo $link->link_id; ?>">
    130127<?php
    131128
Note: See TracChangeset for help on using the changeset viewer.