Skip to content

Commit 96f335d

Browse files
committed
Administration: Fix radio button selection alignment.
Fix issue where the selected state dot on radio buttons was not centered when scaling is set to a value greater than 100%. Remove the `.tog` class and styles, unused since [26072]. Props presskopp, siliconforks, suhan2411, sabernhardt, shailu25, joedolson. Fixes #64816. git-svn-id: https://develop.svn.wordpress.org/trunk@62089 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 5bbce56 commit 96f335d

3 files changed

Lines changed: 9 additions & 15 deletions

File tree

src/wp-admin/css/forms.css

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,11 @@ td > input[type="checkbox"],
171171
}
172172

173173
input[type="radio"] {
174+
display: inline-flex;
174175
border-radius: 50%;
175176
margin-right: 0.25rem;
176-
/* 10px not sure if still necessary, comes from the MP6 redesign in r26072 */
177-
line-height: 0.71428571;
177+
align-items: center;
178+
justify-content: center;
178179
}
179180

180181
input[type="checkbox"]:checked::before,
@@ -211,10 +212,10 @@ input[type="radio"]:checked::before {
211212
border-radius: 50%;
212213
width: 0.5rem; /* 8px */
213214
height: 0.5rem; /* 8px */
214-
margin: 0.1875rem; /* 3px */
215+
margin: auto;
215216
background-color: #fff;
216-
/* 16px not sure if still necessary, comes from the MP6 redesign in r26072 */
217-
line-height: 1.14285714;
217+
/* Only visible in Windows High Contrast mode */
218+
outline: 4px solid transparent;
218219
}
219220

220221
@-moz-document url-prefix() {
@@ -957,13 +958,6 @@ ul#add-to-blog-users {
957958
line-height: 1.4;
958959
}
959960

960-
.form-table input.tog,
961-
.form-table input[type="radio"] {
962-
margin-top: -4px;
963-
margin-right: 4px;
964-
float: none;
965-
}
966-
967961
.form-table .pre {
968962
padding: 8px;
969963
margin: 0;

src/wp-admin/includes/misc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,7 @@ function admin_color_scheme_picker( $user_id ) {
10341034

10351035
?>
10361036
<div class="color-option <?php echo ( $color === $current_color ) ? 'selected' : ''; ?>">
1037-
<input name="admin_color" id="admin_color_<?php echo esc_attr( $color ); ?>" type="radio" value="<?php echo esc_attr( $color ); ?>" class="tog" <?php checked( $color, $current_color ); ?> />
1037+
<input name="admin_color" id="admin_color_<?php echo esc_attr( $color ); ?>" type="radio" value="<?php echo esc_attr( $color ); ?>" <?php checked( $color, $current_color ); ?> />
10381038
<input type="hidden" class="css_url" value="<?php echo esc_url( $color_info->url ); ?>" />
10391039
<input type="hidden" class="icon_colors" value="<?php echo esc_attr( wp_json_encode( array( 'icons' => $color_info->icon_colors ) ) ); ?>" />
10401040
<label for="admin_color_<?php echo esc_attr( $color ); ?>"><?php echo esc_html( $color_info->name ); ?></label>

src/wp-admin/options-reading.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,12 @@
9090
<td id="front-static-pages"><fieldset>
9191
<legend class="screen-reader-text"><span><?php echo $your_homepage_displays_title; ?></span></legend>
9292
<p><label>
93-
<input name="show_on_front" type="radio" value="posts" class="tog" <?php checked( 'posts', get_option( 'show_on_front' ) ); ?> />
93+
<input name="show_on_front" type="radio" value="posts" <?php checked( 'posts', get_option( 'show_on_front' ) ); ?> />
9494
<?php _e( 'Your latest posts' ); ?>
9595
</label>
9696
</p>
9797
<p><label>
98-
<input name="show_on_front" type="radio" value="page" class="tog" <?php checked( 'page', get_option( 'show_on_front' ) ); ?> />
98+
<input name="show_on_front" type="radio" value="page" <?php checked( 'page', get_option( 'show_on_front' ) ); ?> />
9999
<?php
100100
printf(
101101
/* translators: %s: URL to Pages screen. */

0 commit comments

Comments
 (0)