Make WordPress Core

Ticket #49931: 49931.1.diff

File 49931.1.diff, 2.1 KB (added by sabernhardt, 11 months ago)

lower specificity (on front) and inherit text colors

  • src/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss

     
    979979        .has-secondary-background-color,
    980980        .has-dark-gray-background-color,
    981981        .has-light-gray-background-color {
    982 
    983982                // Use white text against these backgrounds by default.
    984983                color: $color__background-body;
    985984
    986                 > p,
    987                 > h1,
    988                 > h2,
    989                 > h3,
    990                 > h4,
    991                 > h5,
    992                 > h6,
    993                 > a {
    994                         color: $color__background-body;
     985                :where(p, h1, h2, h3, h4, h5, h6, a:not(.wp-element-button):not(.has-text-color)) {
     986                        color: inherit;
    995987                }
    996988        }
    997989
    998990        .has-white-background-color {
     991                // Use dark gray text against this background by default.
    999992                color: $color__text-main;
    1000993
    1001                 // Use dark gray text against this background by default.
    1002                 > p,
    1003                 > h1,
    1004                 > h2,
    1005                 > h3,
    1006                 > h4,
    1007                 > h5,
    1008                 > h6,
    1009                 > a {
    1010                         color: $color__text-main;
     994                :where(p, h1, h2, h3, h4, h5, h6, a:not(.wp-element-button):not(.has-text-color)) {
     995                        color: inherit;
    1011996                }
    1012997        }
    1013998
  • src/wp-content/themes/twentynineteen/style-editor.scss

     
    179179.has-light-gray-background-color {
    180180        color: $color__background-body;
    181181
    182         p,
    183         h1,
    184         h2,
    185         h3,
    186         h4,
    187         h5,
    188         h6,
    189         a {
    190                 color: $color__background-body;
     182        // Low specificity for headings and paragraphs, higher for links.
     183        :where(p, h1, h2, h3, h4, h5, h6),
     184        a:not(.wp-element-button):not(.has-text-color) {
     185                color: inherit;
    191186        }
    192187}
    193188
     
    195190.has-white-background-color {
    196191        color: $color__text-main;
    197192
    198         p,
    199         h1,
    200         h2,
    201         h3,
    202         h4,
    203         h5,
    204         h6,
    205         a {
    206                 color: $color__text-main;
     193        // Low specificity for headings and paragraphs, higher for links.
     194        :where(p, h1, h2, h3, h4, h5, h6),
     195        a:not(.wp-element-button):not(.has-text-color) {
     196                color: inherit;
    207197        }
    208198}
    209199