Make WordPress Core


Ignore:
Timestamp:
03/12/2022 10:51:52 PM (2 years ago)
Author:
audrasjb
Message:

Twenty Nineteen: Display Image block at the same size whether the image is linked or not.

This change makes sure the max-width value is assigned for linked images.

Props JarretC, sabernhardt.
Fixes #48697.

File:
1 edited

Legend:

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

    r48073 r52927  
    547547
    548548        // If an image does not have a left/center/right alignment,
    549         // it's a direct child of .wp-block-img.  If it has no other
    550         // alignment added, we want to make sure the image does not
    551         // extend beyond the width of the text column.
    552         &:not(.alignwide):not(.alignfull) > img {
     549        // it's a direct child of .wp-block-image.  If it has no other
     550        // alignment added, we want to make sure the image and its
     551        // caption do not extend beyond the width of the text column.
     552        &:not(.alignwide):not(.alignfull) > img,
     553        &:not(.alignwide):not(.alignfull) > a > img,
     554        &:not(.alignwide):not(.alignfull) > img + figcaption,
     555        &:not(.alignwide):not(.alignfull) > a + figcaption {
    553556            @include postContentMaxWidth();
    554557        }
     
    804807
    805808        // Ensure images do not expand beyond the column.
     809        .wp-block-image:not(.alignwide):not(.alignfull) > img,
     810        .wp-block-image:not(.alignwide):not(.alignfull) > a > img,
    806811        .wp-block-image > img:not(.alignwide):not(.alignfull),
    807812        .wp-block-image > figure {
Note: See TracChangeset for help on using the changeset viewer.