Make WordPress Core


Ignore:
Timestamp:
12/22/2020 03:00:49 PM (6 years ago)
Author:
desrosj
Message:

Twenty Twenty-One: Improve striped table styling in Dark Mode.

This change improves the display of table blocks with the “Stripes” style selected.

Previously, the text was not visible in striped rows when using Dark Mode.

Props ryelle, poena, melchoyce, celendesign, audrasjb.
Fixes #52129.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwentyone/assets/sass/05-blocks/table/_editor.scss

    r49574 r49864  
    11table,
    22.wp-block-table {
     3
     4        thead,
     5        tfoot {
     6                text-align: center;
     7        }
    38
    49        th {
    … …  
    1217
    1318        &.is-style-regular .has-background,
     19        &.is-style-stripes .has-background,
    1420        &.is-style-stripes .has-background thead tr,
    1521        &.is-style-stripes .has-background tfoot tr,
    16         &.is-style-stripes .has-background tbody tr:nth-child(even) {
     22        &.is-style-stripes .has-background tbody tr {
    1723                color: var(--table--has-background-text-color);
    1824        }
    … …  
    2834                tbody tr:nth-child(odd) {
    2935                        background-color: var(--table--stripes-background-color);
     36                }
     37
     38                .has-background tbody tr:nth-child(odd) {
     39                        background-color: var(--global--color-white-90);
    3040                }
    3141        }
Note: See TracChangeset for help on using the changeset viewer.