Make WordPress Core


Ignore:
Timestamp:
09/16/2026 08:40:07 PM (7 days ago)
Author:
joedolson
Message:

Privacy: Restore list table zebra striping.

The Privacy export and erase tables overrode zebra striping because they used background color to represent row states. When the background color was changed to a left border indicator, the striping was not restored.

Restore zebra striping and add targeted overrides to ensure that the inserted tr for request results has a style matching its related row.

Props afercia, hbhalodia, joedolson.
Fixes #65994.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/forms.css

    r63559 r63645  
    14911491.privacy_requests thead td:first-child,
    14921492.privacy_requests tfoot td:first-child {
    1493         border-left: 4px solid #fff;
     1493        border-left: 4px solid transparent;
    14941494}
    14951495
    14961496.privacy_requests tbody td.check-column {
    1497         border-left: 4px solid #fff;
    1498         background: #fff;
    1499         box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
     1497        border-left: 4px solid transparent;
    15001498}
    15011499
     
    15041502}
    15051503
    1506 .privacy_requests tbody .has-request-results th {
    1507         box-shadow: none;
    1508 }
    1509 
    15101504.privacy_requests tbody .request-results th .notice {
    15111505        margin: 0 0 5px;
    15121506}
    15131507
    1514 .privacy_requests tbody td:not(.check-column),
    1515 .privacy_requests tbody th {
    1516         background: #fff;
    1517         box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    1518 }
    1519 
    1520 .privacy_requests tbody .has-request-results td {
    1521         box-shadow: none;
     1508/*
     1509 * The results row is injected after its request row, so it lands on the opposite
     1510 * stripe. Invert it to match.
     1511 */
     1512.privacy_requests tbody tr.request-results:nth-child(even) {
     1513        background-color: #f6f7f7;
     1514}
     1515
     1516.privacy_requests tbody tr.request-results:nth-child(odd) {
     1517        background-color: transparent;
     1518}
     1519
     1520/*
     1521 * Where supported, skip the injected rows in the stripe count instead, so they
     1522 * no longer shift the rows below. The rules above are the fallback.
     1523 */
     1524@supports selector(:nth-child(1 of :not(.request-results))) {
     1525        .privacy_requests tbody > tr:nth-child(odd),
     1526        .privacy_requests tbody > tr.request-results:nth-child(even) {
     1527                background-color: transparent;
     1528        }
     1529
     1530        .privacy_requests tbody > tr:nth-child(odd of :not(.request-results)),
     1531        .privacy_requests tbody > tr:nth-child(odd of :not(.request-results)) + tr.request-results {
     1532                background-color: #f6f7f7;
     1533        }
    15221534}
    15231535
     
    15281540
    15291541.privacy_requests tr.status-request-confirmed td.check-column {
    1530         background-color: #fff;
    15311542        border-left-color: #3858e9;
    15321543}
    15331544
    15341545.privacy_requests tr.status-request-failed td.check-column {
    1535         background-color: #f6f7f7;
    15361546        border-left-color: #cc1818;
    15371547}
Note: See TracChangeset for help on using the changeset viewer.