Make WordPress Core


Ignore:
Timestamp:
01/14/2015 10:13:03 PM (9 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-terms-list-table.php

    r31166 r31181  
    269269    /**
    270270     * @global string $taxonomy
    271      * @staticvar string $row_class
    272271     * @param object $tag
    273272     * @param int $level
     
    277276        $tag = sanitize_term( $tag, $taxonomy );
    278277
    279         static $row_class = '';
    280         $row_class = ( $row_class == '' ? ' class="alternate"' : '' );
    281 
    282278        $this->level = $level;
    283279
    284         echo '<tr id="tag-' . $tag->term_id . '"' . $row_class . '>';
     280        echo '<tr id="tag-' . $tag->term_id . '">';
    285281        $this->single_row_columns( $tag );
    286282        echo '</tr>';
Note: See TracChangeset for help on using the changeset viewer.