Make WordPress Core


Ignore:
Timestamp:
10/04/2017 02:49:19 AM (8 years ago)
Author:
joemcgill
Message:

Media: Use max-width for default captions.

This alters the HTML output of the image caption shortcode to use
max-width instead of width to improve compatibility with
flexible layouts.

Props aaronrutley, desrosj.
Fixes #33981.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/shortcode.php

    r41026 r41724  
    478478            array(
    479479                '[caption caption="test" width="2"]<div>hello</div>[/caption]',
    480                 '<div style="width: 12px" class="wp-caption alignnone"><div>hello</div><p class="wp-caption-text">test</p></div>',
     480                '<div style="max-width: 12px" class="wp-caption alignnone"><div>hello</div><p class="wp-caption-text">test</p></div>',
    481481            ),
    482482            array(
Note: See TracChangeset for help on using the changeset viewer.