sirius-press/plugins/sirius-press-auth/assets/login.css
Local Dev 373394b534 sirius-press: a site with passwords off could not be signed into
Three faults, all on the same screen, all only visible once passwords
were actually turned off — which until now nobody had done on a live
instance.

wp-login.php runs wp_signon() on its way to drawing the form, even for a
plain GET. Core tolerates that by discarding the result, but only when
the error codes are exactly the pair its own password filters produce.
Removing those filters is the whole point of turning passwords off, so
what was left behind was the generic authentication_failed — printed, in
red, above a form with no username and no password, on a site that has
neither. Every visitor was told their sign-in had failed before they
tried.

The paste-a-signature path had no way to submit. It borrowed core's
login button, and the stylesheet that retires the password form hid that
button too. The one route for people whose keys live on another machine
— sign in Electron Cash, paste the result — was therefore broken exactly
on the sites most committed to not having passwords. It now carries its
own plain submit button, so it also works on the screens where there is
no core login form to borrow from, and with JavaScript off.

And the username field outlived the password field, although
authenticate() never reads it either. "Username or Email Address" sat at
the top of a wallet login form: the one thing this fork exists to
remove, in the first place anyone looks. Both go now, with their
required attributes cleared, because a hidden required field does not
fail quietly — it refuses the submit and points an error bubble at a
control nobody can see.
2026-10-03 00:57:34 +02:00

190 lines
4.1 KiB
CSS

/*
* Sign-in screen styling.
*
* Sits on top of whatever wp-login.php already looks like rather than
* replacing it, so a site using a login-branding plugin keeps its branding.
* The only strong visual claim made here is hierarchy: the wallet block reads
* as the way in, and the password field above it reads as a leftover.
*/
/*
* Make the `hidden` attribute actually hide things.
*
* `hidden` works through a UA rule — `[hidden] { display: none }` — which any
* author rule carrying a `display` outranks. WordPress ships exactly such a
* rule: `.wp-core-ui .button { display: inline-block }` in buttons.css, which
* matches every button in this block.
*
* Without this the whole progressive-enhancement story silently inverts. The
* markup ships with the sign-in button, the browser-wallet button and the
* phrase field hidden, and the script reveals only the ones that can work.
* Defeat `hidden` and a visitor with JavaScript off is offered a button that
* does nothing, and everyone is offered a browser wallet that is not there.
*/
.sirius-wallet [hidden] {
display: none !important;
}
.sirius-wallet {
margin: 16px 0 8px;
padding: 16px;
border: 1px solid #dcdcde;
border-radius: 6px;
background: #fbfbfc;
}
.sirius-wallet__message {
width: 100%;
box-sizing: border-box;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
font-size: 11px;
line-height: 1.5;
color: #2c3338;
background: #fff;
border: 1px solid #dcdcde;
border-radius: 4px;
padding: 8px;
resize: vertical;
}
.sirius-wallet__actions {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin: 12px 0 0;
}
.sirius-wallet__phrase {
margin-top: 14px;
}
.sirius-wallet__phrase label {
display: block;
font-weight: 600;
margin-bottom: 4px;
}
.sirius-wallet__phrase-input,
.sirius-wallet__signature,
.sirius-wallet__address-input,
#sirius_derive_phrase {
width: 100%;
box-sizing: border-box;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
font-size: 13px;
padding: 8px;
border: 1px solid #8c8f94;
border-radius: 4px;
/* A recovery phrase is the one secret on this page; never offer it to a
password manager or a spellchecker's network round trip. */
-webkit-text-security: none;
}
.sirius-wallet__hint,
.sirius-hint {
font-size: 12px;
color: #50575e;
margin: 6px 0 0;
line-height: 1.5;
}
.sirius-wallet__manual {
margin-top: 14px;
font-size: 13px;
}
.sirius-wallet__manual summary {
cursor: pointer;
color: #2271b1;
}
.sirius-wallet__status {
margin: 10px 0 0;
min-height: 1.4em;
font-size: 13px;
line-height: 1.4;
}
.sirius-wallet__status.is-error {
color: #b32d2e;
font-weight: 600;
}
.sirius-intro {
border-left-color: #2271b1 !important;
}
/* --- the recovery page ------------------------------------------------- */
.sirius-recovery {
background: #fff;
border: 1px solid #dcdcde;
border-radius: 6px;
padding: 20px 24px;
margin-top: 20px;
font-size: 14px;
line-height: 1.6;
}
.sirius-recovery h2 {
font-size: 15px;
margin: 20px 0 6px;
}
.sirius-recovery .message {
font-weight: 600;
border-left: 4px solid #dba617;
padding: 10px 12px;
background: #fcf9e8;
margin: 0 0 14px;
}
.sirius-derive {
margin-top: 10px;
padding: 12px;
background: #f6f7f7;
border-radius: 4px;
}
.sirius-derive label {
display: block;
font-weight: 600;
margin-bottom: 4px;
}
.sirius-derive__out {
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
font-size: 12px;
word-break: break-all;
margin: 8px 0 0;
min-height: 1.4em;
}
.sirius-derive__out.is-address {
color: #007017;
font-weight: 700;
}
.sirius-derive__out.is-error {
color: #b32d2e;
}
@media (prefers-color-scheme: dark) {
/* wp-login.php has no dark mode of its own, so only soften what would
glare if a login-branding plugin has provided one. */
.sirius-wallet {
background: transparent;
}
}
.sirius-wallet__address-label {
display: block;
font-weight: 600;
margin: 10px 0 4px;
font-size: 13px;
}
/* The paste-a-signature path's own submit button. It lives inside a <details>
that is closed by default, so it needs the breathing room core's form gave
the button it used to borrow. */
.sirius-wallet__submit { margin-top: 10px; }