Make WordPress Core

Ticket #55991: 55991-2.diff

File 55991-2.diff, 3.8 KB (added by poena, 4 years ago)

Only apply the default font size if there is no user set font size.

  • src/wp-content/themes/twentytwentyone/assets/sass/04-elements/blockquote.scss

     
    11blockquote {
    2         padding: 0;
    32        position: relative;
    43        margin: var(--global--spacing-vertical) 0 var(--global--spacing-vertical) var(--global--spacing-horizontal);
    54
     
    1918        p {
    2019                letter-spacing: var(--heading--letter-spacing-h4);
    2120                font-family: var(--quote--font-family);
    22                 font-size: var(--quote--font-size);
    2321                font-style: var(--quote--font-style);
    2422                font-weight: var(--quote--font-weight);
    2523                line-height: var(--quote--line-height);
     
    2927        footer {
    3028                font-weight: normal;
    3129                color: var(--global--color-primary);
    32                 font-size: var(--global--font-size-xs);
    3330                letter-spacing: var(--global--letter-spacing);
    3431        }
    3532
     
    5754
    5855        &:before {
    5956                content: "\201C";
    60                 font-size: var(--quote--font-size);
    6157                line-height: var(--quote--line-height);
    6258                position: absolute;
    6359                left: calc(-0.5 * var(--global--spacing-horizontal));
     
    6763        cite,
    6864        footer {
    6965                color: var(--global--color-primary);
    70                 font-size: var(--global--font-size-xs);
    7166                font-style: var(--quote--font-style-cite);
    7267        }
    7368
     
    7974                }
    8075        }
    8176}
     77
     78/* Ony apply the default font size if the user has not selected a size. */
     79blockquote:not([class*="font-size"]) {
     80        font-size: var(--quote--font-size);
     81
     82        &:before {
     83                font-size: var(--quote--font-size);
     84        }
     85
     86        .wp-block-quote__citation,
     87        cite,
     88        footer {
     89                font-size: var(--global--font-size-xs);
     90        }
     91}
  • src/wp-content/themes/twentytwentyone/assets/sass/05-blocks/quote/_editor.scss

     
    55
    66        p {
    77                font-family: var(--quote--font-family);
    8                 font-size: var(--quote--font-size);
    98                font-style: var(--quote--font-style);
    109                font-weight: var(--quote--font-weight);
    1110                line-height: var(--quote--line-height);
     
    1716
    1817        &:before {
    1918                content: "\201C";
    20                 font-size: var(--quote--font-size);
    2119                line-height: var(--quote--line-height);
    2220                left: calc(-0.5 * var(--global--spacing-horizontal));
    2321        }
     
    2422
    2523        .wp-block-quote__citation {
    2624                color: currentColor;
    27                 font-size: var(--global--font-size-xs);
    2825                font-style: var(--quote--font-style-cite);
    2926
    3027                .has-background &,
     
    6360                }
    6461        }
    6562
     63        // This block style has been removed from WordPress core,
     64        // the CSS is kept for backwards compatibility.
    6665        &.is-large,
    6766        &.is-style-large {
    6867                padding-left: 0;
  • src/wp-content/themes/twentytwentyone/assets/sass/05-blocks/quote/_style.scss

     
    33
    44        &:before {
    55                content: "\201C";
    6                 font-size: var(--quote--font-size);
    76                line-height: var(--quote--line-height);
    87                left: 8px;
    98        }
     
    1110        .wp-block-quote__citation,
    1211        cite,
    1312        footer {
    14 
    1513                .has-background &,
    1614                [class*="background-color"] &,
    1715                [style*="background-color"] &,
     
    136134                }
    137135        }
    138136}
     137
     138/* Ony apply the default font size if the user has not selected a size. */
     139blockquote:not([class*="font-size"]) {
     140        font-size: var(--quote--font-size);
     141       
     142        &:before {
     143                font-size: var(--quote--font-size);
     144        }
     145       
     146        .wp-block-quote__citation,
     147        cite,
     148        footer {
     149                font-size: var(--global--font-size-xs);
     150        }
     151}
     152