Skip to content

Commit 77a1f39

Browse files
Upgrade/Install: Bring some consistency to installation screen styles.
* Include `forms.css` and `l10n.css`, for consistency with login screen and other admin screens. * Remove redundant `@import` directives from `login.css` for files already declared as dependencies. * Adjust margin on password strength meter for consistency with other fields. * Increase font size for "You will need this password to log in" notice. * Fix misaligned icon on "Hide" button for the password. Props iseulde, dan@micamedia.com, bassgang, cdog, johnbillion, nmenescardi, mukesh27, SergeyBiryukov. Fixes #35776, #47757, #47758. git-svn-id: https://develop.svn.wordpress.org/trunk@45673 602fd350-edb4-49c9-b593-d223f7449a82
1 parent f00229a commit 77a1f39

6 files changed

Lines changed: 9 additions & 94 deletions

File tree

src/wp-admin/css/forms.css

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ fieldset label,
464464
background-color: #eee;
465465
border: 1px solid #ddd;
466466
color: #23282d;
467-
margin: -1px 0 5px;
467+
margin: -1px 1px 5px;
468468
padding: 3px 5px;
469469
text-align: center;
470470
width: 25em;
@@ -522,7 +522,7 @@ fieldset label,
522522

523523
.wp-pwd [type="text"],
524524
.wp-pwd [type="password"] {
525-
margin: 0;
525+
margin-bottom: 0;
526526
/* Same height as the buttons */
527527
line-height: 20px;
528528
min-height: 28px;
@@ -542,10 +542,6 @@ fieldset label,
542542
display: inline-block;
543543
}
544544

545-
.form-table span.description.important {
546-
font-size: 12px;
547-
}
548-
549545
p.search-box {
550546
float: right;
551547
margin: 0;

src/wp-admin/css/install.css

Lines changed: 3 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,9 @@ submit {
174174
.form-table input[type=text],
175175
.form-table input[type=email],
176176
.form-table input[type=url],
177-
.form-table input[type=password] {
178-
width: 206px;
177+
.form-table input[type=password],
178+
#pass-strength-result {
179+
width: 218px;
179180
}
180181

181182
.form-table th p {
@@ -212,66 +213,6 @@ submit {
212213
font-family: Consolas, Monaco, monospace;
213214
}
214215

215-
.wp-hide-pw > .dashicons {
216-
line-height: inherit;
217-
}
218-
219-
#pass-strength-result {
220-
background-color: #eee;
221-
border: 1px solid #ddd;
222-
color: #23282d;
223-
margin: -2px 5px 5px 0px;
224-
padding: 3px 5px;
225-
text-align: center;
226-
width: 218px;
227-
box-sizing: border-box;
228-
opacity: 0;
229-
}
230-
231-
#pass-strength-result.short {
232-
background-color: #f1adad;
233-
border-color: #e35b5b;
234-
opacity: 1;
235-
}
236-
237-
#pass-strength-result.bad {
238-
background-color: #fbc5a9;
239-
border-color: #f78b53;
240-
opacity: 1;
241-
}
242-
243-
#pass-strength-result.good {
244-
background-color: #ffe399;
245-
border-color: #ffc733;
246-
opacity: 1;
247-
}
248-
249-
#pass-strength-result.strong {
250-
background-color: #c1e1b9;
251-
border-color: #83c373;
252-
opacity: 1;
253-
}
254-
255-
#pass1.short, #pass1-text.short {
256-
border-color: #e35b5b;
257-
}
258-
259-
#pass1.bad, #pass1-text.bad {
260-
border-color: #f78b53;
261-
}
262-
263-
#pass1.good, #pass1-text.good {
264-
border-color: #ffc733;
265-
}
266-
267-
#pass1.strong, #pass1-text.strong {
268-
border-color: #83c373;
269-
}
270-
271-
.pw-weak {
272-
display: none;
273-
}
274-
275216
.message {
276217
border-left: 4px solid #dc3232;
277218
padding: .7em .6em;
@@ -291,20 +232,6 @@ submit {
291232
direction: ltr;
292233
}
293234

294-
#pass1-text,
295-
.show-password #pass1 {
296-
display: none;
297-
}
298-
299-
.show-password #pass1-text
300-
{
301-
display: inline-block;
302-
}
303-
304-
.form-table span.description.important {
305-
font-size: 12px;
306-
}
307-
308235

309236
/* localization */
310237
body.rtl,

src/wp-admin/css/login.css

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
@import url(forms.css);
2-
@import url(l10n.css);
3-
41
html,
52
body {
63
height: 100%;

src/wp-admin/install.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,7 @@ function display_header( $body_classes = '' ) {
7171
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7272
<meta name="robots" content="noindex,nofollow" />
7373
<title><?php _e( 'WordPress &rsaquo; Installation' ); ?></title>
74-
<?php
75-
wp_admin_css( 'install', true );
76-
wp_admin_css( 'dashicons', true );
77-
?>
74+
<?php wp_admin_css( 'install', true ); ?>
7875
</head>
7976
<body class="wp-core-ui<?php echo $body_classes; ?>">
8077
<p id="logo"><a href="<?php echo esc_url( __( 'https://wordpress.org/' ) ); ?>"><?php _e( 'WordPress' ); ?></a></p>
@@ -142,7 +139,7 @@ function display_setup_form( $error = null ) {
142139
</label>
143140
</th>
144141
<td>
145-
<div class="">
142+
<div class="wp-pwd">
146143
<?php $initial_password = isset( $_POST['admin_password'] ) ? stripslashes( $_POST['admin_password'] ) : wp_generate_password( 18 ); ?>
147144
<input type="password" name="admin_password" id="pass1" class="regular-text" autocomplete="off" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
148145
<button type="button" class="button wp-hide-pw hide-if-no-js" data-start-masked="<?php echo (int) isset( $_POST['admin_password'] ); ?>" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">

src/wp-admin/maint/repair.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
1919
<meta name="robots" content="noindex,nofollow" />
2020
<title><?php _e( 'WordPress &rsaquo; Database Repair' ); ?></title>
21-
<?php
22-
wp_admin_css( 'install', true );
23-
?>
21+
<?php wp_admin_css( 'install', true ); ?>
2422
</head>
2523
<body class="wp-core-ui">
2624
<p id="logo"><a href="<?php echo esc_url( __( 'https://wordpress.org/' ) ); ?>"><?php _e( 'WordPress' ); ?></a></p>

src/wp-includes/script-loader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1948,7 +1948,7 @@ function wp_default_styles( &$styles ) {
19481948
$styles->add( 'wp-admin', false, array( 'dashicons', 'common', 'forms', 'admin-menu', 'dashboard', 'list-tables', 'edit', 'revisions', 'media', 'themes', 'about', 'nav-menus', 'widgets', 'site-icon', 'l10n' ) );
19491949

19501950
$styles->add( 'login', "/wp-admin/css/login$suffix.css", array( 'dashicons', 'buttons', 'forms', 'l10n' ) );
1951-
$styles->add( 'install', "/wp-admin/css/install$suffix.css", array( 'buttons' ) );
1951+
$styles->add( 'install', "/wp-admin/css/install$suffix.css", array( 'dashicons', 'buttons', 'forms', 'l10n' ) );
19521952
$styles->add( 'wp-color-picker', "/wp-admin/css/color-picker$suffix.css" );
19531953
$styles->add( 'customize-controls', "/wp-admin/css/customize-controls$suffix.css", array( 'wp-admin', 'colors', 'ie', 'imgareaselect' ) );
19541954
$styles->add( 'customize-widgets', "/wp-admin/css/customize-widgets$suffix.css", array( 'wp-admin', 'colors' ) );

0 commit comments

Comments
 (0)