Skip to content

Commit

Permalink
Media: On Media Settings screen, make the pairs of labels and inputs …
Browse files Browse the repository at this point in the history
…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.
Fixes #42724. See #34539.
Built from https://develop.svn.wordpress.org/trunk@42864


git-svn-id: http://core.svn.wordpress.org/trunk@42694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
SergeyBiryukov committed Mar 20, 2018
1 parent 2ac3192 commit 61a0745
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 46 deletions.
17 changes: 0 additions & 17 deletions wp-admin/css/common-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -3952,23 +3952,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. */
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/css/common-rtl.min.css

Large diffs are not rendered by default.

17 changes: 0 additions & 17 deletions wp-admin/css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -3952,23 +3952,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. */
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/css/common.min.css

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion wp-admin/css/forms-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/css/forms-rtl.min.css

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion wp-admin/css/forms.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/css/forms.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion wp-admin/css/login-rtl.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion wp-admin/css/login.min.css

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions wp-admin/options-media.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,15 @@
<table class="form-table">
<tr>
<th scope="row"><?php _e( 'Thumbnail size' ); ?></th>
<td>
<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" />
<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>
</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>

Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-42863';
$wp_version = '5.0-alpha-42864';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

0 comments on commit 61a0745

Please sign in to comment.