Media: On Media Settings screen, make the pairs of labels and inputs always stacked vertically, on both mobile and desktop screens.

Make `<br />` tags on the screen behave as line breaks again after [41836]. Add a missing fieldset + legend for better accessibility.

Props afercia, RavanH, obenland, garrett-eclipse.
Merges [42864] to the 4.9 branch.
Fixes #42724. See #34539.
Built from https://develop.svn.wordpress.org/branches/4.9@42865


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2018-03-20 22:49:39 +00:00
parent 8fae65141a
commit 9d75986391
12 changed files with 34 additions and 50 deletions

View File

@ -3943,23 +3943,6 @@ img {
}
}
.options-media-php br {
display: none;
}
@media screen and (max-width: 375px) {
.options-media-php input[type="number"][name*="_size_"] {
margin: 5px 0;
}
.options-media-php label[for*="_size_h"]:before {
content: '';
display: block;
}
.options-media-php br {
display: block;
}
}
@media screen and (max-width: 320px) {
/* Prevent default center alignment and larger font for the Right Now widget when
the network dashboard is viewed on a small mobile device. */

File diff suppressed because one or more lines are too long

View File

@ -3943,23 +3943,6 @@ img {
}
}
.options-media-php br {
display: none;
}
@media screen and (max-width: 375px) {
.options-media-php input[type="number"][name*="_size_"] {
margin: 5px 0;
}
.options-media-php label[for*="_size_h"]:before {
content: '';
display: block;
}
.options-media-php br {
display: block;
}
}
@media screen and (max-width: 320px) {
/* Prevent default center alignment and larger font for the Right Now widget when
the network dashboard is viewed on a small mobile device. */

File diff suppressed because one or more lines are too long

View File

@ -438,7 +438,15 @@ fieldset label,
vertical-align: middle;
}
.options-media-php label[for*="_size_"],
.options-media-php [for*="_size_"] {
min-width: 10em;
vertical-align: baseline;
}
.options-media-php .small-text[name*="_size_"] {
margin: 0 0 1em;
}
#misc-publishing-actions label {
vertical-align: baseline;
}

File diff suppressed because one or more lines are too long

View File

@ -438,7 +438,15 @@ fieldset label,
vertical-align: middle;
}
.options-media-php label[for*="_size_"],
.options-media-php [for*="_size_"] {
min-width: 10em;
vertical-align: baseline;
}
.options-media-php .small-text[name*="_size_"] {
margin: 0 0 1em;
}
#misc-publishing-actions label {
vertical-align: baseline;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -51,13 +51,15 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
<table class="form-table">
<tr>
<th scope="row"><?php _e('Thumbnail size') ?></th>
<td>
<label for="thumbnail_size_w"><?php _e('Width'); ?></label>
<input name="thumbnail_size_w" type="number" step="1" min="0" id="thumbnail_size_w" value="<?php form_option('thumbnail_size_w'); ?>" class="small-text" />
<label for="thumbnail_size_h"><?php _e('Height'); ?></label>
<input name="thumbnail_size_h" type="number" step="1" min="0" id="thumbnail_size_h" value="<?php form_option('thumbnail_size_h'); ?>" class="small-text" />
<p><input name="thumbnail_crop" type="checkbox" id="thumbnail_crop" value="1" <?php checked('1', get_option('thumbnail_crop')); ?>/>
<label for="thumbnail_crop"><?php _e('Crop thumbnail to exact dimensions (normally thumbnails are proportional)'); ?></label></p>
<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Thumbnail size' ); ?></span></legend>
<label for="thumbnail_size_w"><?php _e( 'Width' ); ?></label>
<input name="thumbnail_size_w" type="number" step="1" min="0" id="thumbnail_size_w" value="<?php form_option( 'thumbnail_size_w' ); ?>" class="small-text" />
<br />
<label for="thumbnail_size_h"><?php _e( 'Height' ); ?></label>
<input name="thumbnail_size_h" type="number" step="1" min="0" id="thumbnail_size_h" value="<?php form_option( 'thumbnail_size_h' ); ?>" class="small-text" />
</fieldset>
<input name="thumbnail_crop" type="checkbox" id="thumbnail_crop" value="1" <?php checked( '1', get_option( 'thumbnail_crop' ) ); ?>/>
<label for="thumbnail_crop"><?php _e( 'Crop thumbnail to exact dimensions (normally thumbnails are proportional)' ); ?></label>
</td>
</tr>

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9.5-alpha-42861';
$wp_version = '4.9.5-alpha-42865';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.