Skip to content

Commit

Permalink
Move mobile devices CSS from wp-login.php to wp-admin.css, props Serg…
Browse files Browse the repository at this point in the history
…eyBiryukov, fixes #19673

git-svn-id: http://svn.automattic.com/wordpress/trunk@20430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
azaozz committed Apr 11, 2012
1 parent 7492250 commit 000b7a9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
20 changes: 20 additions & 0 deletions wp-admin/css/wp-admin.dev.css
Original file line number Diff line number Diff line change
Expand Up @@ -6200,6 +6200,26 @@ a.rsswidget {
text-align: center;
}

.mobile #login {
padding: 20px 0;
}

.mobile #login form,
.mobile #login .message,
.mobile #login_error {
margin-left: 0;
}

.mobile #login #nav,
.mobile #login #backtoblog {
margin-left: 8px;
}

.mobile #login h1 a {
width: auto;
}


/* ms */
/* Dashboard: MS Specific Data */
#dashboard_right_now p.musub {
Expand Down
14 changes: 3 additions & 11 deletions wp-login.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,8 @@ function login_header($title = 'Log In', $message = '', $wp_error = '') {
wp_admin_css( 'wp-admin', true );
wp_admin_css( 'colors-fresh', true );

if ( wp_is_mobile() ) {
?>
<meta name="viewport" content="width=320; initial-scale=0.9; maximum-scale=1.0; user-scalable=0;" />
<style type="text/css" media="screen">
.login form, .login .message, #login_error { margin-left: 0px; }
.login #nav, .login #backtoblog { margin-left: 8px; }
.login h1 a { width: auto; }
#login { padding: 20px 0; }
</style>
<?php
if ( wp_is_mobile() ) { ?>
<meta name="viewport" content="width=320; initial-scale=0.9; maximum-scale=1.0; user-scalable=0;" /><?php
}

do_action( 'login_enqueue_scripts' );
Expand All @@ -92,7 +84,7 @@ function login_header($title = 'Log In', $message = '', $wp_error = '') {

?>
</head>
<body class="login">
<body class="login<?php if ( wp_is_mobile() ) echo ' mobile'; ?>">
<div id="login">
<h1><a href="<?php echo esc_url( $login_header_url ); ?>" title="<?php echo esc_attr( $login_header_title ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
<?php
Expand Down

0 comments on commit 000b7a9

Please sign in to comment.