wp-m365-login/assets/css/login.css
Friederich Loheide 7749ebff9b
Some checks are pending
CI / PHP lint (7.4) (pull_request) Waiting to run
CI / PHP lint (8.0) (pull_request) Waiting to run
CI / PHP lint (8.1) (pull_request) Waiting to run
CI / PHP lint (8.2) (pull_request) Waiting to run
CI / PHP lint (8.3) (pull_request) Waiting to run
CI / PHP lint (8.4) (pull_request) Waiting to run
CI / WordPress Coding Standards (pull_request) Waiting to run
CI / WordPress.org Plugin Check (pull_request) Waiting to run
Remove the login box frame and hide "Lost your password?" reliably
- No border or shadow around the login box on wp-login.php (form and
  Microsoft block, also in button-only mode); the white area stays.
- Button-only mode: the "Lost your password?" link is removed through
  lost_password_html_link instead of CSS only, the lostpassword,
  retrievepassword, rp and resetpass screens redirect to the login page
  and allow_password_reset refuses resets – all unless the fallback link
  is active.
- The login stylesheet is also loaded when only the form is hidden
  (e.g. broken connection); before, the link and form showed there.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 04:30:13 +00:00

198 lines
3.9 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* M365 Login login screen button */
.m365-login {
--m365-bg: #2f2f2f;
--m365-bg-hover: #1a1a1a;
--m365-color: #ffffff;
--m365-border: #2f2f2f;
--m365-radius: 4px;
margin: 0 0 16px;
}
.m365-login--below {
background: #fff;
padding: 0 24px 26px;
margin: -1px 0 0;
border: 0;
box-shadow: none;
}
/* No frame around the login box: neither around the form nor around the Microsoft block. */
body.m365-login-page #loginform,
body.m365-login-attached #loginform {
border: 0;
box-shadow: none;
}
.m365-login--above {
background: #fff;
padding: 24px;
margin: 20px 0 0;
border: 0;
box-shadow: none;
}
.m365-login--above .m365-login__divider {
margin: 22px 0 0;
}
.m365-login__divider {
position: relative;
text-align: center;
margin: 0 0 22px;
color: #646970;
font-size: 13px;
line-height: 1;
}
.m365-login__divider::before {
content: "";
position: absolute;
left: 0;
right: 0;
top: 50%;
height: 1px;
background: #dcdcde;
}
.m365-login__divider span {
position: relative;
background: #fff;
padding: 0 12px;
text-transform: lowercase;
}
.m365-login__button {
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
box-sizing: border-box;
width: 100%;
min-height: 44px;
padding: 10px 16px;
background: var(--m365-bg);
color: var(--m365-color);
border: 1px solid var(--m365-border);
border-radius: var(--m365-radius);
font-size: 15px;
font-weight: 600;
line-height: 1.3;
text-decoration: none;
cursor: pointer;
transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.m365-login__button:hover,
.m365-login__button:focus {
background: var(--m365-bg-hover);
color: var(--m365-color);
text-decoration: none;
}
.m365-login__button:focus {
outline: none;
box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--m365-bg-hover);
}
.m365-login__button:active {
transform: translateY(1px);
}
.m365-login__icon {
flex: 0 0 auto;
width: 20px;
height: 20px;
display: block;
background: #fff;
padding: 3px;
box-sizing: content-box;
border-radius: 2px;
}
.m365-login__label {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.m365-login--shortcode {
padding: 0;
border: 0;
background: transparent;
max-width: 360px;
}
/* Button-only mode: the password form is hidden until the fallback key is used. */
body.m365-button-only #loginform,
body.m365-button-only #nav,
body.m365-button-only a[href*="action=lostpassword"],
body.m365-button-only .wp-login-lost-password {
display: none !important;
}
body.m365-button-only .m365-login--below,
body.m365-button-only .m365-login--above {
margin-top: 20px;
padding: 26px 24px;
border: 0;
box-shadow: none;
}
/* Custom login pages: wp_login_form() injection, shortcode and template function. */
.m365-login--form {
margin: 16px 0 0;
padding: 0;
border: 0;
background: transparent;
}
/* On unknown backgrounds the divider uses flex lines instead of an absolute line behind the text. */
.m365-login--form .m365-login__divider,
.m365-login--shortcode .m365-login__divider {
display: flex;
align-items: center;
gap: 12px;
margin: 0 0 16px;
}
.m365-login--form .m365-login__divider::before,
.m365-login--shortcode .m365-login__divider::before,
.m365-login--form .m365-login__divider::after,
.m365-login--shortcode .m365-login__divider::after {
content: "";
position: static;
flex: 1 1 auto;
height: 1px;
background: #dcdcde;
}
.m365-login--form .m365-login__divider span,
.m365-login--shortcode .m365-login__divider span {
position: static;
padding: 0;
background: transparent;
}
.m365-login__notice {
box-sizing: border-box;
margin: 0 0 16px;
padding: 12px 14px;
border-left: 4px solid #72aee6;
background: #fff;
color: #1d2327;
font-size: 14px;
line-height: 1.5;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}
.m365-login__notice--error {
border-left-color: #d63638;
}
.m365-login__notice--message {
border-left-color: #00a32a;
}
.m365-login__hidden-fields {
display: none !important;
}