Make WordPress Core


Ignore:
Timestamp:
06/23/2024 02:36:37 PM (5 months ago)
Author:
karmatosed
Message:

Twenty Twenty-One: Fixes font size difference in latest comments block.

The font size was different in the last comments block depending on if it was in the editor or front. This resolves that by checking block for special font size before applying default and using inherit for nested elements.

Props pitamdey, sabernhardt.
Fixes #61082.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwentyone/assets/sass/05-blocks/latest-comments/_style.scss

    r49574 r58464  
    22    padding-left: 0;
    33
     4    &:where(:not([class*="-font-size"]):not([style*="font-size"])) .wp-block-latest-comments__comment {
     5        font-size: var(--global--font-size-sm);
     6    }
     7
    48    .wp-block-latest-comments__comment {
    5         font-size: var(--global--font-size-sm);
    69        line-height: var(--global--line-height-body);
    710
     
    2427
    2528    .wp-block-latest-comments__comment-date {
    26         color: var(--global--color-primary);
    27         font-size: var(--global--font-size-sm);
     29        color: inherit;
     30        font-size: inherit;
    2831    }
    2932
    3033    .wp-block-latest-comments__comment-excerpt p {
    31         font-size: var(--global--font-size-sm);
     34        font-size: inherit;
    3235        line-height: var(--global--line-height-body);
    3336        margin: 0;
Note: See TracChangeset for help on using the changeset viewer.