Make WordPress Core

Changeset 43871


Ignore:
Timestamp:
11/06/2018 01:09:57 AM (6 years ago)
Author:
laurelfulford
Message:

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

A handful of issues were missed in Twenty Twelve's Gutenberg support, added in #45040. 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 final paragraph in the block doesn't add too much space.
  • Simplify selectors used to set editor width to just .wp-block.

Props pento, davidakennedy.
Fixes #45240.

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

Legend:

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

    r43795 r43871  
    128128}
    129129
    130 /* Cover Image */
    131 
    132 .wp-block-cover-image.aligncenter {
     130/* Cover */
     131
     132.wp-block-cover-image.aligncenter,
     133.wp-block-cover.aligncenter {
    133134    display: flex;
    134135}
     
    297298}
    298299
     300/* Media & Text */
     301
     302.wp-block-media-text {
     303    margin-bottom: 24px;
     304    margin-bottom: 1.714285714rem;
     305}
     306
     307.wp-block-media-text *:last-child {
     308    margin-bottom: 0;
     309}
     310
    299311/*--------------------------------------------------------------
    3003125.0 Blocks - Widgets
    301313--------------------------------------------------------------*/
     314
     315/* Archives, Categories & Latest Posts */
     316
     317.wp-block-archives.aligncenter,
     318.wp-block-categories.aligncenter,
     319.wp-block-latest-posts.aligncenter {
     320    list-style-position: inside;
     321    text-align: center;
     322}
    302323
    303324/* Latest Comments */
  • branches/5.0/src/wp-content/themes/twentytwelve/css/editor-blocks.css

    r43795 r43871  
    2525}
    2626
     27.editor-default-block-appender input[type="text"].editor-default-block-appender__content {
     28    font-family: "Open Sans", Helvetica, Arial, sans-serif;
     29}
     30
    2731.edit-post-visual-editor .editor-block-list__block {
    2832    color: #444;
     
    7175/* Main column width */
    7276
    73 body.gutenberg-editor-page .edit-post-visual-editor .editor-post-title__block,
    74 body.gutenberg-editor-page .edit-post-visual-editor .editor-default-block-appender,
    75 body.gutenberg-editor-page .edit-post-visual-editor .editor-block-list__block {
    76     max-width: 655px;
     77.wp-block {
     78    max-width: 655px; /* 625px + 30px for padding */
    7779}
    7880
     
    219221}
    220222
    221 /* Cover Image */
    222 
    223 .edit-post-visual-editor .editor-block-list__block .wp-block-cover-image p {
     223/* Cover */
     224
     225.edit-post-visual-editor .editor-block-list__block .wp-block-cover-image p,
     226.edit-post-visual-editor .editor-block-list__block .wp-block-cover p {
    224227    font-size: 28px;
    225228}
     
    360363}
    361364
     365/* Media & Text */
     366
     367.wp-block-media-text *:last-child {
     368    margin-bottom: 0;
     369}
     370
    362371/*--------------------------------------------------------------
    3633726.0 Blocks - Widgets
    364373--------------------------------------------------------------*/
    365374
     375/* Archives, Categories & Latest Posts */
     376
     377[data-align="center"] .wp-block-archives ul,
     378[data-align="center"] .wp-block-categories ul,
     379[data-align="center"] .wp-block-latest-posts ul {
     380    list-style-position: inside;
     381}
     382
    366383/* Archives */
     384
    367385.gutenberg ul.wp-block-archives {
    368386    padding-left: 0;
Note: See TracChangeset for help on using the changeset viewer.