Skip to content

Instantly share code, notes, and snippets.

@jaredkc
Last active August 29, 2015 14:26
Show Gist options
  • Save jaredkc/45d08ed5a8335b9a4e3d to your computer and use it in GitHub Desktop.
Save jaredkc/45d08ed5a8335b9a4e3d to your computer and use it in GitHub Desktop.
Styles for the WordPress login screen (`/wp-login.php`)
/**
* Styles for the login screen
*/
function _login() {
wp_enqueue_style( 'login', get_template_directory_uri() . '/assets/css/login.css' );
}
add_action( 'login_enqueue_scripts', '_login' );
/**
* Custom styles for the WP login page
* /wp-login.php
*/
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
body.login {
background: #999 url(../img/login-bg.png) bottom center repeat-x;
}
#login {
background: #999;
}
#login h1 a {
background: url(../img/site-logo.png) center center no-repeat;
height: 50px;
width: 200px;
}
#loginform {
box-shadow: none;
padding: 0 0 30px 0;
position: relative !important; /* to override static set on login error */
}
#loginform p {
border-bottom: 1px solid #ddd;
}
#loginform label,
#user_login,
#user_pass,
#wp-submit {
font-weight: 300;
}
#loginform label,
#wp-submit {
font-size: 18px;
}
#loginform label,
#user_login,
#user_pass {
line-height: 30px;
}
#loginform label {
color: #b1b1b1;
display: block;
padding: 5px 30px;
position: relative;
}
#user_login,
#user_pass {
background: none;
border: 0;
box-shadow: none;
color: #999;
margin: 0 0 5px 0;
}
#loginform p.forgetmenot {
background-color: #eee;
border-bottom: 0;
float: none;
margin-left: 30px;
margin-right: 30px;
margin-top: 30px;
}
#loginform p.forgetmenot label {
color: #666;
padding: 15px 25px;
}
#login form p.submit {
margin: 0 30px 30px 30px;
}
#wp-submit {
background: #999;
border: 0;
border-radius: 0;
height: 60px;
margin: 0;
width: 100%;
}
#wp-submit:hover {
background: #333;
}
.login #nav {
background: #666;
font-size: 1.2em;
font-weight: 300;
text-align: center;
}
/* Hiding this because you must login so it's useless */
#backtoblog {
display: none;
}
@media (min-width: 550px) {
#login {
width: 520px;
}
#loginform label,
#user_login,
#user_pass,
#wp-submit {
font-size: 24px;
}
#loginform label,
#user_login,
#user_pass {
line-height: 50px;
}
#loginform label {
padding-bottom: 15px;
padding-top: 15px;
width: 100%;
}
#user_login,
#user_pass {
position: absolute;
right: 30px;
top: 12px;
width: 60%;
}
#loginform p.forgetmenot {
width: 60%;
}
#login form p.submit {
bottom: 30px;
margin: 0;
position: absolute;
right: 30px;
width: 35%;
}
#wp-submit {
height: 80px;
width: 100%;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment