Make WordPress Core

Changeset 54154


Ignore:
Timestamp:
09/14/2022 10:46:51 AM (20 months ago)
Author:
audrasjb
Message:

Twenty Twenty: Ensure headings styles are consistent between editor and front-end.

This changeset removes .wp-block container from headings CSS selectors to restore consistency between editor and front-end styles. It also removes .wp-block from headings selectors in the 'block-editor' array of twentytwenty_get_localized_font_family_elements().

Props kajalgohel, kmadhak, poena, multidots1896, tahmidulkarim, audrasjb.
Fixes #56194.

Location:
trunk/src/wp-content/themes/twentytwenty
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwenty/assets/css/editor-style-block-rtl.css

    r54153 r54154  
    122122.editor-post-title__block .editor-post-title__input,
    123123.editor-styles-wrapper .wp-block-post-title,
    124 .editor-styles-wrapper .wp-block h1,
    125 .editor-styles-wrapper .wp-block h2,
    126 .editor-styles-wrapper .wp-block h3,
    127 .editor-styles-wrapper .wp-block h4,
    128 .editor-styles-wrapper .wp-block h5,
    129 .editor-styles-wrapper .wp-block h6,
     124.editor-styles-wrapper h1,
     125.editor-styles-wrapper h2,
     126.editor-styles-wrapper h3,
     127.editor-styles-wrapper h4,
     128.editor-styles-wrapper h5,
     129.editor-styles-wrapper h6,
    130130.editor-styles-wrapper .has-drop-cap:not(:focus)::first-letter,
    131131.editor-styles-wrapper cite,
     
    139139    .editor-post-title__block .editor-post-title__input,
    140140    .editor-styles-wrapper .wp-block-post-title,
    141     .editor-styles-wrapper .wp-block h1,
    142     .editor-styles-wrapper .wp-block h2,
    143     .editor-styles-wrapper .wp-block h3,
    144     .editor-styles-wrapper .wp-block h4,
    145     .editor-styles-wrapper .wp-block h5,
    146     .editor-styles-wrapper .wp-block h6,
     141    .editor-styles-wrapper h1,
     142    .editor-styles-wrapper h2,
     143    .editor-styles-wrapper h3,
     144    .editor-styles-wrapper h4,
     145    .editor-styles-wrapper h5,
     146    .editor-styles-wrapper h6,
    147147    .editor-styles-wrapper .has-drop-cap:not(:focus)::first-letter,
    148148    .editor-styles-wrapper cite,
     
    243243.editor-post-title__block .editor-post-title__input,
    244244.editor-styles-wrapper .wp-block-post-title,
    245 .editor-styles-wrapper .wp-block h1,
    246 .editor-styles-wrapper .wp-block h2,
    247 .editor-styles-wrapper .wp-block h3,
    248 .editor-styles-wrapper .wp-block h4,
    249 .editor-styles-wrapper .wp-block h5,
    250 .editor-styles-wrapper .wp-block h6 {
     245.editor-styles-wrapper h1,
     246.editor-styles-wrapper h2,
     247.editor-styles-wrapper h3,
     248.editor-styles-wrapper h4,
     249.editor-styles-wrapper h5,
     250.editor-styles-wrapper h6 {
    251251    font-feature-settings: "lnum";
    252252    font-variant-numeric: lining-nums;
     
    260260.editor-post-title__block .editor-post-title__input,
    261261.editor-styles-wrapper .wp-block-post-title,
    262 .editor-styles-wrapper .wp-block h1 {
     262.editor-styles-wrapper h1,
     263.editor-styles-wrapper .heading-size-1 {
    263264    font-size: 36px;
    264265    font-weight: 800;
     
    266267}
    267268
    268 .editor-styles-wrapper .wp-block h2 {
     269.editor-styles-wrapper h2,
     270.editor-styles-wrapper .heading-size-2 {
    269271    font-size: 32px;
    270272}
    271273
    272 .editor-styles-wrapper .wp-block h3 {
     274.editor-styles-wrapper h3,
     275.editor-styles-wrapper .heading-size-3 {
    273276    font-size: 28px;
    274277}
    275278
    276 .editor-styles-wrapper .wp-block h4 {
     279.editor-styles-wrapper h4,
     280.editor-styles-wrapper .heading-size-4 {
    277281    font-size: 24px;
    278282}
    279283
    280 .editor-styles-wrapper .wp-block h5 {
     284.editor-styles-wrapper h5,
     285.editor-styles-wrapper .heading-size-5 {
    281286    font-size: 21px;
    282287}
    283288
    284 .editor-styles-wrapper .wp-block h6 {
     289.editor-styles-wrapper h6,
     290.editor-styles-wrapper .heading-size-6 {
    285291    font-size: 16px;
    286292    letter-spacing: 0.03125em;
     
    12491255    .editor-post-title__block .editor-post-title__input,
    12501256    .editor-styles-wrapper .wp-block-post-title,
    1251     .editor-styles-wrapper .wp-block h1 {
     1257    .editor-styles-wrapper h1,
     1258    .editor-styles-wrapper .heading-size-1 {
    12521259        font-size: 64px;
    12531260    }
    12541261
    1255     .editor-styles-wrapper .wp-block h2 {
     1262    .editor-styles-wrapper h2,
     1263    .editor-styles-wrapper .heading-size-2 {
    12561264        font-size: 48px;
    12571265    }
    12581266
    1259     .editor-styles-wrapper .wp-block h3 {
     1267    .editor-styles-wrapper h3,
     1268    .editor-styles-wrapper .heading-size-3 {
    12601269        font-size: 40px;
    12611270    }
    12621271
    1263     .editor-styles-wrapper .wp-block h4 {
     1272    .editor-styles-wrapper h4,
     1273    .editor-styles-wrapper .heading-size-4 {
    12641274        font-size: 32px;
    12651275    }
    12661276
    1267     .editor-styles-wrapper .wp-block h5 {
     1277    .editor-styles-wrapper h5,
     1278    .editor-styles-wrapper .heading-size-5 {
    12681279        font-size: 24px;
    12691280    }
     
    14281439    .editor-post-title__block .editor-post-title__input,
    14291440    .editor-styles-wrapper .wp-block-post-title,
    1430     .editor-styles-wrapper .wp-block h1 {
     1441    .editor-styles-wrapper h1,
     1442    .editor-styles-wrapper .heading-size-1 {
    14311443        font-size: 84px;
    14321444    }
    14331445
    1434     .editor-styles-wrapper .wp-block h6 {
     1446    .editor-styles-wrapper h6,
     1447    .editor-styles-wrapper .heading-size-6 {
    14351448        font-size: 18px;
    14361449    }
  • trunk/src/wp-content/themes/twentytwenty/assets/css/editor-style-block.css

    r54153 r54154  
    122122.editor-post-title__block .editor-post-title__input,
    123123.editor-styles-wrapper .wp-block-post-title,
    124 .editor-styles-wrapper .wp-block h1,
    125 .editor-styles-wrapper .wp-block h2,
    126 .editor-styles-wrapper .wp-block h3,
    127 .editor-styles-wrapper .wp-block h4,
    128 .editor-styles-wrapper .wp-block h5,
    129 .editor-styles-wrapper .wp-block h6,
     124.editor-styles-wrapper h1,
     125.editor-styles-wrapper h2,
     126.editor-styles-wrapper h3,
     127.editor-styles-wrapper h4,
     128.editor-styles-wrapper h5,
     129.editor-styles-wrapper h6,
    130130.editor-styles-wrapper .has-drop-cap:not(:focus)::first-letter,
    131131.editor-styles-wrapper cite,
     
    139139    .editor-post-title__block .editor-post-title__input,
    140140    .editor-styles-wrapper .wp-block-post-title,
    141     .editor-styles-wrapper .wp-block h1,
    142     .editor-styles-wrapper .wp-block h2,
    143     .editor-styles-wrapper .wp-block h3,
    144     .editor-styles-wrapper .wp-block h4,
    145     .editor-styles-wrapper .wp-block h5,
    146     .editor-styles-wrapper .wp-block h6,
     141    .editor-styles-wrapper h1,
     142    .editor-styles-wrapper h2,
     143    .editor-styles-wrapper h3,
     144    .editor-styles-wrapper h4,
     145    .editor-styles-wrapper h5,
     146    .editor-styles-wrapper h6,
    147147    .editor-styles-wrapper .has-drop-cap:not(:focus)::first-letter,
    148148    .editor-styles-wrapper cite,
     
    243243.editor-post-title__block .editor-post-title__input,
    244244.editor-styles-wrapper .wp-block-post-title,
    245 .editor-styles-wrapper .wp-block h1,
    246 .editor-styles-wrapper .wp-block h2,
    247 .editor-styles-wrapper .wp-block h3,
    248 .editor-styles-wrapper .wp-block h4,
    249 .editor-styles-wrapper .wp-block h5,
    250 .editor-styles-wrapper .wp-block h6 {
     245.editor-styles-wrapper h1,
     246.editor-styles-wrapper h2,
     247.editor-styles-wrapper h3,
     248.editor-styles-wrapper h4,
     249.editor-styles-wrapper h5,
     250.editor-styles-wrapper h6 {
    251251    font-feature-settings: "lnum";
    252252    font-variant-numeric: lining-nums;
     
    260260.editor-post-title__block .editor-post-title__input,
    261261.editor-styles-wrapper .wp-block-post-title,
    262 .editor-styles-wrapper .wp-block h1 {
     262.editor-styles-wrapper h1,
     263.editor-styles-wrapper .heading-size-1 {
    263264    font-size: 36px;
    264265    font-weight: 800;
     
    266267}
    267268
    268 .editor-styles-wrapper .wp-block h2 {
     269.editor-styles-wrapper h2,
     270.editor-styles-wrapper .heading-size-2 {
    269271    font-size: 32px;
    270272}
    271273
    272 .editor-styles-wrapper .wp-block h3 {
     274.editor-styles-wrapper h3,
     275.editor-styles-wrapper .heading-size-3 {
    273276    font-size: 28px;
    274277}
    275278
    276 .editor-styles-wrapper .wp-block h4 {
     279.editor-styles-wrapper h4,
     280.editor-styles-wrapper .heading-size-4 {
    277281    font-size: 24px;
    278282}
    279283
    280 .editor-styles-wrapper .wp-block h5 {
     284.editor-styles-wrapper h5,
     285.editor-styles-wrapper .heading-size-5 {
    281286    font-size: 21px;
    282287}
    283288
    284 .editor-styles-wrapper .wp-block h6 {
     289.editor-styles-wrapper h6,
     290.editor-styles-wrapper .heading-size-6 {
    285291    font-size: 16px;
    286292    letter-spacing: 0.03125em;
     
    12531259    .editor-post-title__block .editor-post-title__input,
    12541260    .editor-styles-wrapper .wp-block-post-title,
    1255     .editor-styles-wrapper .wp-block h1 {
     1261    .editor-styles-wrapper h1,
     1262    .editor-styles-wrapper .heading-size-1 {
    12561263        font-size: 64px;
    12571264    }
    12581265
    1259     .editor-styles-wrapper .wp-block h2 {
     1266    .editor-styles-wrapper h2,
     1267    .editor-styles-wrapper .heading-size-2 {
    12601268        font-size: 48px;
    12611269    }
    12621270
    1263     .editor-styles-wrapper .wp-block h3 {
     1271    .editor-styles-wrapper h3,
     1272    .editor-styles-wrapper .heading-size-3 {
    12641273        font-size: 40px;
    12651274    }
    12661275
    1267     .editor-styles-wrapper .wp-block h4 {
     1276    .editor-styles-wrapper h4,
     1277    .editor-styles-wrapper .heading-size-4 {
    12681278        font-size: 32px;
    12691279    }
    12701280
    1271     .editor-styles-wrapper .wp-block h5 {
     1281    .editor-styles-wrapper h5,
     1282    .editor-styles-wrapper .heading-size-5 {
    12721283        font-size: 24px;
    12731284    }
     
    14321443    .editor-post-title__block .editor-post-title__input,
    14331444    .editor-styles-wrapper .wp-block-post-title,
    1434     .editor-styles-wrapper .wp-block h1 {
     1445    .editor-styles-wrapper h1,
     1446    .editor-styles-wrapper .heading-size-1 {
    14351447        font-size: 84px;
    14361448    }
    14371449
    1438     .editor-styles-wrapper .wp-block h6 {
     1450    .editor-styles-wrapper h6,
     1451    .editor-styles-wrapper .heading-size-6 {
    14391452        font-size: 18px;
    14401453    }
  • trunk/src/wp-content/themes/twentytwenty/assets/css/editor-style-classic-rtl.css

    r52661 r54154  
    216216}
    217217
    218 body#tinymce.wp-editor.content h1 {
     218body#tinymce.wp-editor.content h1,
     219body#tinymce.wp-editor.content .heading-size-1 {
    219220    font-size: 84px;
    220221    font-weight: 800;
     
    222223}
    223224
    224 body#tinymce.wp-editor.content h2 {
     225body#tinymce.wp-editor.content h2,
     226body#tinymce.wp-editor.content .heading-size-2 {
    225227    font-size: 48px;
    226228}
    227229
    228 body#tinymce.wp-editor.content h3 {
     230body#tinymce.wp-editor.content h3,
     231body#tinymce.wp-editor.content .heading-size-3 {
    229232    font-size: 40px;
    230233}
    231234
    232 body#tinymce.wp-editor.content h4 {
     235body#tinymce.wp-editor.content h4,
     236body#tinymce.wp-editor.content .heading-size-4 {
    233237    font-size: 32px;
    234238}
    235239
    236 body#tinymce.wp-editor.content h5 {
     240body#tinymce.wp-editor.content h5,
     241body#tinymce.wp-editor.content .heading-size-5 {
    237242    font-size: 24px;
    238243}
    239244
    240 body#tinymce.wp-editor.content h6 {
     245body#tinymce.wp-editor.content h6,
     246body#tinymce.wp-editor.content .heading-size-6 {
    241247    font-size: 18px;
    242248    letter-spacing: 0.03125em;
  • trunk/src/wp-content/themes/twentytwenty/assets/css/editor-style-classic.css

    r52661 r54154  
    216216}
    217217
    218 body#tinymce.wp-editor.content h1 {
     218body#tinymce.wp-editor.content h1,
     219body#tinymce.wp-editor.content .heading-size-1 {
    219220    font-size: 84px;
    220221    font-weight: 800;
     
    222223}
    223224
    224 body#tinymce.wp-editor.content h2 {
     225body#tinymce.wp-editor.content h2,
     226body#tinymce.wp-editor.content .heading-size-2 {
    225227    font-size: 48px;
    226228}
    227229
    228 body#tinymce.wp-editor.content h3 {
     230body#tinymce.wp-editor.content h3,
     231body#tinymce.wp-editor.content .heading-size-3 {
    229232    font-size: 40px;
    230233}
    231234
    232 body#tinymce.wp-editor.content h4 {
     235body#tinymce.wp-editor.content h4,
     236body#tinymce.wp-editor.content .heading-size-4 {
    233237    font-size: 32px;
    234238}
    235239
    236 body#tinymce.wp-editor.content h5 {
     240body#tinymce.wp-editor.content h5,
     241body#tinymce.wp-editor.content .heading-size-5 {
    237242    font-size: 24px;
    238243}
    239244
    240 body#tinymce.wp-editor.content h6 {
     245body#tinymce.wp-editor.content h6,
     246body#tinymce.wp-editor.content .heading-size-6 {
    241247    font-size: 18px;
    242248    letter-spacing: 0.03125em;
  • trunk/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-non-latin-languages.php

    r52271 r54154  
    120120                array(
    121121                    'front-end'      => array( 'body', 'input', 'textarea', 'button', '.button', '.faux-button', '.wp-block-button__link', '.wp-block-file__button', '.has-drop-cap:not(:focus)::first-letter', '.entry-content .wp-block-archives', '.entry-content .wp-block-categories', '.entry-content .wp-block-cover-image', '.entry-content .wp-block-latest-comments', '.entry-content .wp-block-latest-posts', '.entry-content .wp-block-pullquote', '.entry-content .wp-block-quote.is-large', '.entry-content .wp-block-quote.is-style-large', '.entry-content .wp-block-archives *', '.entry-content .wp-block-categories *', '.entry-content .wp-block-latest-posts *', '.entry-content .wp-block-latest-comments *', '.entry-content p', '.entry-content ol', '.entry-content ul', '.entry-content dl', '.entry-content dt', '.entry-content cite', '.entry-content figcaption', '.entry-content .wp-caption-text', '.comment-content p', '.comment-content ol', '.comment-content ul', '.comment-content dl', '.comment-content dt', '.comment-content cite', '.comment-content figcaption', '.comment-content .wp-caption-text', '.widget_text p', '.widget_text ol', '.widget_text ul', '.widget_text dl', '.widget_text dt', '.widget-content .rssSummary', '.widget-content cite', '.widget-content figcaption', '.widget-content .wp-caption-text' ),
    122                     'block-editor'   => array( '.editor-styles-wrapper > *', '.editor-styles-wrapper p', '.editor-styles-wrapper ol', '.editor-styles-wrapper ul', '.editor-styles-wrapper dl', '.editor-styles-wrapper dt', '.editor-post-title__block .editor-post-title__input', '.editor-styles-wrapper .wp-block-post-title', '.editor-styles-wrapper .wp-block h1', '.editor-styles-wrapper .wp-block h2', '.editor-styles-wrapper .wp-block h3', '.editor-styles-wrapper .wp-block h4', '.editor-styles-wrapper .wp-block h5', '.editor-styles-wrapper .wp-block h6', '.editor-styles-wrapper .has-drop-cap:not(:focus)::first-letter', '.editor-styles-wrapper cite', '.editor-styles-wrapper figcaption', '.editor-styles-wrapper .wp-caption-text' ),
     122                    'block-editor'   => array( '.editor-styles-wrapper > *', '.editor-styles-wrapper p', '.editor-styles-wrapper ol', '.editor-styles-wrapper ul', '.editor-styles-wrapper dl', '.editor-styles-wrapper dt', '.editor-post-title__block .editor-post-title__input', '.editor-styles-wrapper .wp-block-post-title', '.editor-styles-wrapper h1', '.editor-styles-wrapper h2', '.editor-styles-wrapper h3', '.editor-styles-wrapper h4', '.editor-styles-wrapper h5', '.editor-styles-wrapper h6', '.editor-styles-wrapper .has-drop-cap:not(:focus)::first-letter', '.editor-styles-wrapper cite', '.editor-styles-wrapper figcaption', '.editor-styles-wrapper .wp-caption-text' ),
    123123                    'classic-editor' => array( 'body#tinymce.wp-editor', 'body#tinymce.wp-editor p', 'body#tinymce.wp-editor ol', 'body#tinymce.wp-editor ul', 'body#tinymce.wp-editor dl', 'body#tinymce.wp-editor dt', 'body#tinymce.wp-editor figcaption', 'body#tinymce.wp-editor .wp-caption-text', 'body#tinymce.wp-editor .wp-caption-dd', 'body#tinymce.wp-editor cite', 'body#tinymce.wp-editor table' ),
    124124                )
Note: See TracChangeset for help on using the changeset viewer.