Make WordPress Core

Changeset 58214


Ignore:
Timestamp:
05/27/2024 06:01:56 PM (6 weeks ago)
Author:
joedolson
Message:

Media: Improve scale/crop layout in image editor medium breakpoints.

Adjust the max-width of the image edit settings panel so that reflow handling at intermediary breakpoints is more consistent and less fragile.

Props deepakvijayan, huzaifaalmesbah, joedolson, khokansardar.
Fixes #58979.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/media.css

    r58146 r58214  
    902902
    903903.imgedit-settings {
    904     max-width: 400px; /* Prevent reflow when help info is expanded. */
     904    max-width: 240px; /* Prevent reflow when help info is expanded. */
    905905}
    906906
  • trunk/src/wp-admin/includes/image-edit.php

    r57524 r58214  
    160160                            <input type="number" step="1" min="0" max="<?php echo isset( $meta['height'] ) ? $meta['height'] : ''; ?>" aria-describedby="imgedit-scale-warn-<?php echo $post_id; ?>" id="imgedit-scale-height-<?php echo $post_id; ?>" onkeyup="imageEdit.scaleChanged(<?php echo $post_id; ?>, 0, this)" onblur="imageEdit.scaleChanged(<?php echo $post_id; ?>, 0, this)" value="<?php echo isset( $meta['height'] ) ? $meta['height'] : 0; ?>" />
    161161                            <button id="imgedit-scale-button" type="button" onclick="imageEdit.action(<?php echo "$post_id, '$nonce'"; ?>, 'scale')" class="button button-primary"><?php esc_html_e( 'Scale' ); ?></button>
     162                            </div>
    162163                            <span class="imgedit-scale-warn" id="imgedit-scale-warn-<?php echo $post_id; ?>"><span class="dashicons dashicons-warning" aria-hidden="true"></span><?php esc_html_e( 'Images cannot be scaled to a size larger than the original.' ); ?></span>
    163                             </div>
    164164                        </fieldset>
    165165                        </div>
Note: See TracChangeset for help on using the changeset viewer.