Make WordPress Core


Ignore:
Timestamp:
01/07/2019 04:05:48 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Twenty Nineteen: Push right-aligned image block outside of text column.

Update right-aligned image block styles to push them outside of the text column on the front end, to match the original design and how the block looks in the editor.

Props kjellr, joen, allancole.
Merges [44371] to the 5.0 branch.
Fixes #45716.

Location:
branches/5.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0

  • branches/5.0/src/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss

    r44424 r44428  
    506506    //! Image
    507507    .wp-block-image {
     508        max-width: 100%;
    508509
    509510        img {
     
    511512        }
    512513
    513         &.alignleft,
    514         &.alignright {
    515             max-width: 100%;
     514        .aligncenter {
     515           
     516            @include postContentMaxWidth();
     517
     518            @include media(tablet) {
     519                margin: 0;
     520                width: $size__site-tablet-content;
     521
     522                img {
     523                    margin: 0 auto;
     524                }
     525            }
     526
     527            @include media(desktop) {
     528                width: $size__site-desktop-content;
     529
     530                img {
     531                    margin: 0 auto;
     532                }
     533            }
    516534        }
    517535
    518536        &.alignfull img {
    519537            width: 100vw;
     538            max-width: calc( 100% + (2 * #{$size__spacing-unit}));
    520539
    521540            @include media(tablet) {
     541                max-width: calc( 125% + 150px );
    522542                margin-left: auto;
    523543                margin-right: auto;
Note: See TracChangeset for help on using the changeset viewer.