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/template.php

    r31090 r31181  
    590590    $r = '';
    591591    ++ $count;
    592     if ( $count % 2 )
    593         $style = 'alternate';
    594     else
    595         $style = '';
    596592
    597593    if ( is_serialized( $entry['meta_value'] ) ) {
     
    612608    $delete_nonce = wp_create_nonce( 'delete-meta_' . $entry['meta_id'] );
    613609
    614     $r .= "\n\t<tr id='meta-{$entry['meta_id']}' class='$style'>";
     610    $r .= "\n\t<tr id='meta-{$entry['meta_id']}'>";
    615611    $r .= "\n\t\t<td class='left'><label class='screen-reader-text' for='meta-{$entry['meta_id']}-key'>" . __( 'Key' ) . "</label><input name='meta[{$entry['meta_id']}][key]' id='meta-{$entry['meta_id']}-key' type='text' size='20' value='{$entry['meta_key']}' />";
    616612
Note: See TracChangeset for help on using the changeset viewer.