Skip to content

Commit 9a3ab81

Browse files
committed
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. git-svn-id: https://develop.svn.wordpress.org/trunk@58214 602fd350-edb4-49c9-b593-d223f7449a82
1 parent ca2a585 commit 9a3ab81

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/wp-admin/css/media.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ border color while dragging a file over the uploader drop area */
901901
}
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

907907
.imgedit-group-controls > * {

src/wp-admin/includes/image-edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ function wp_image_editor( $post_id, $msg = false ) {
159159
<label for="imgedit-scale-height-<?php echo $post_id; ?>" class="screen-reader-text"><?php _e( 'scale height' ); ?></label>
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-
<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>
163162
</div>
163+
<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>
164164
</fieldset>
165165
</div>
166166
</div>

0 commit comments

Comments
 (0)