Make WordPress Core


Ignore:
Timestamp:
01/14/2015 10:13:03 PM (12 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/my-sites.php

    r27469 r31181  
    7676        ?>
    7777        <br clear="all" />
    78         <table class="widefat fixed">
     78        <table class="widefat fixed striped">
    7979        <?php
    8080        /**
     
    110110        }
    111111
    112         $c = '';
    113112        foreach ( $rows as $row ) {
    114                 $c = $c == 'alternate' ? '' : 'alternate';
    115                 echo "<tr class='$c'>";
     113                echo "<tr>";
    116114                $i = 0;
    117115                foreach ( $row as $user_blog ) {
Note: See TracChangeset for help on using the changeset viewer.