Make WordPress Core


Ignore:
Timestamp:
12/28/2018 09:21:48 PM (8 years ago)
Author:
laurelfulford
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.
Fixes #45716.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss

    r44370 r44371  
    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.