WordPress.org

Make WordPress Core

Changeset 43876


Ignore:
Timestamp:
11/06/2018 06:16:39 AM (13 months ago)
Author:
laurelfulford
Message:

Twenty Seventeen: Fix issues with theme's Gutenberg support.

A handful of issues were missed in Twenty Seventeen's Gutenberg support, added in #45045. This commit includes the following fixes:

  • Update editor placeholder text to use the correct font family.
  • Center text and bullets in list-based widget blocks, when block itself is centered.
  • Include non "image" variations of the Cover block classes .wp-block-cover and .wp-block-cover-text in the styles.
  • Add spacing underneath the Media & Text block, but make sure the final paragraph in the block doesn't add too much space.
  • Simplify selectors used to set editor width to just .wp-block.
  • Prevent margin from theme's editor-style.css from interfering with editor alignment.


Props pento, davidakennedy.
Fixes #45246.

Location:
branches/5.0/src/wp-content/themes/twentyseventeen/assets/css
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-content/themes/twentyseventeen/assets/css/blocks.css

    r43800 r43876  
    9898}
    9999
    100 /* Cover Image */
     100/* Cover */
    101101
    102102.wp-block-cover-image.alignright,
     103.wp-block-cover.alignright,
    103104.wp-block-cover-image.alignleft,
    104 .wp-block-cover-image.aligncenter {
     105.wp-block-cover.alignleft,
     106.wp-block-cover-image.aligncenter,
     107.wp-block-cover.aligncenter {
    105108    display: flex;
    106109}
     
    220223}
    221224
     225/* Media & Text */
     226
     227.wp-block-media-text {
     228    margin-bottom: 1.5em;
     229}
     230
     231.wp-block-media-text *:last-child {
     232    margin-bottom: 0;
     233}
     234
    222235/*--------------------------------------------------------------
    2232365.0 Blocks - Widgets
    224237--------------------------------------------------------------*/
     238
     239/* Archives, Categories & Latest Posts */
     240
     241.wp-block-archives.aligncenter,
     242.wp-block-categories.aligncenter,
     243.wp-block-latest-posts.aligncenter {
     244    list-style-position: inside;
     245    text-align: center;
     246}
    225247
    226248/* Comments */
  • branches/5.0/src/wp-content/themes/twentyseventeen/assets/css/editor-blocks.css

    r43800 r43876  
    2424    font-size: 15px;
    2525    font-size: 0.9375rem;
     26}
     27
     28.editor-default-block-appender input[type="text"].editor-default-block-appender__content {
     29    font-family: "Libre Franklin", "Helvetica Neue", helvetica, arial, sans-serif;
    2630}
    2731
     
    347351/* Main column width */
    348352
    349 body.gutenberg-editor-page .edit-post-visual-editor .editor-post-title__block,
    350 body.gutenberg-editor-page .edit-post-visual-editor .editor-default-block-appender,
    351 body.gutenberg-editor-page .edit-post-visual-editor .editor-block-list__block {
    352     max-width: 740px;
     353.editor-styles-wrapper {
     354    max-width: 100% !important; /* Override where editor-style.css is affecting this. */
     355}
     356
     357.wp-block {
     358    max-width: 674px; /* Based on one-column post width; 644px + 30px to account for padding. */
    353359}
    354360
     
    696702--------------------------------------------------------------*/
    697703
    698 /* Separators */
     704/* Separator */
    699705
    700706.edit-post-visual-editor .wp-block-separator {
     
    722728    white-space: nowrap;
    723729}
     730
     731/* Media & Text */
     732
     733.wp-block-media-text *:last-child {
     734    margin-bottom: 0;
     735}
     736
    724737/*--------------------------------------------------------------
    7257386.0 Blocks - Widgets
    726739--------------------------------------------------------------*/
     740
     741/* Archives, Categories & Latest Posts */
     742
     743[data-align="center"] .wp-block-archives ul,
     744[data-align="center"] .wp-block-categories ul,
     745[data-align="center"] .wp-block-latest-posts ul {
     746    list-style-position: inside;
     747}
    727748
    728749/* Latest Comments */
Note: See TracChangeset for help on using the changeset viewer.