Skip to content

Restyle pre-login pages: brand purple + WCAG AA contrast fixes - #38079

Open
kcowger wants to merge 3 commits into
masterfrom
kc/prelogin-refresh-css
Open

Restyle pre-login pages: brand purple + WCAG AA contrast fixes#38079
kcowger wants to merge 3 commits into
masterfrom
kc/prelogin-refresh-css

Conversation

@kcowger

@kcowger kcowger commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Product Description

Restyles the sign-in and sign-up pages to align stylistically with the commcare.dimagi.com webpage. The idea is, when someone flows through commcare.dimagi.com to commcarehq.org, it should feel cohesive from page to page.

Also introduces a couple small WCAG AA accessibility improvements.

Before (Sign In)
image

After (Sign In)
image

Before (Sign Up)
image

After (Sign Up)
image

Technical Summary

Three independent commits: WCAG AA fixes, the rebrand, and the logo link. All rules are scoped under a prelogin body class set only by pre-login templates and live in the stylesheets that own the elements they restyle. The authenticated app never sets the class.

Feature Flag

None.

Safety Assurance

Safety story

Verified locally on both pages. Rules are inert wherever the body class is absent.

Automated test coverage

None added; presentational CSS.

QA Plan

One known boundary: a project with custom branding shows its own logo image on its domain login page; that logo now sits on the dark blue bar and dark logos may have low contrast there.

Visual check of sign-in and sign-up on www/eu/india, desktop and mobile.

Rollback instructions

  • This PR can be reverted after deploy with no further considerations

Labels & Review

  • Risk label is set correctly
  • The set of people pinged as reviewers is appropriate for the level of risk of the change

🤖 Generated with Claude Code

@dimagimon dimagimon added the Risk: Medium Change affects files that have been flagged as medium risk. label Aug 28, 2026
@kcowger
kcowger force-pushed the kc/prelogin-refresh-css branch from f28aa52 to ab407c1 Compare August 28, 2026 20:02
@kcowger kcowger added the product/all-users-all-environments Change impacts all users on all environments label Aug 28, 2026
@kcowger
kcowger force-pushed the kc/prelogin-refresh-css branch 4 times, most recently from 00d48c8 to bf71471 Compare September 3, 2026 21:12
@kcowger
kcowger requested a review from nospame September 4, 2026 15:26
@kcowger
kcowger marked this pull request as ready for review September 4, 2026 15:26
@kcowger
kcowger force-pushed the kc/prelogin-refresh-css branch from bf71471 to 8262757 Compare September 4, 2026 15:55
@kcowger
kcowger marked this pull request as draft September 4, 2026 15:59
@kcowger
kcowger removed the request for review from nospame September 4, 2026 16:04
@kcowger
kcowger marked this pull request as ready for review September 4, 2026 17:12
@kcowger
kcowger requested a review from nospame September 4, 2026 17:12
@kcowger

kcowger commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

@nospame retrying for review. no need to spend too much time on this

@nospame nospame left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General feedback: I think we need to make sure we're not leaving dead code by overriding a bunch of styles that (as far as I know) are only ever used on registration pages, versus changing those styles at their definition.


.prelogin {
.form-bubble {
.btn-primary {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could these buttons use Bootstrap's sass mixins rather than setting CSS styles? https://getbootstrap.com/docs/5.3/components/buttons/#sass-mixins

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, switched to button-variant / button-outline-variant.

}
}

.prelogin {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know that I fully buy the new prelogin class is necessary (it might be). Is it possible to see whether the affected registration styles (i.e. without the .prelogin selector) would be used elsewhere? If they're not, we can change those styles directly rather than adding new styles here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kept only for the shared navbar, set by the login template for logged-out viewers only, so logged-in views of inheriting pages keep the normal nav. everything else is changed at the definition.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we have a version of this file already, corehq/apps/registration/static/registration/images/commcare_by_dimagi.png, but this one might be different in ways I'm missing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, reusing the existing white logo and dropped the new file.


$prelogin-step-circle: 28px;

.prelogin ul.form-step-progress {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These new styles probably mean we can remove the old ones immediately above.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, replaced at the definition.

} No newline at end of file
}
.prelogin {
.navbar-hq-main-menu {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm torn on whether this belongs here or in registration-main because that's the only place it ever gets used, don't think I have a strong preference though.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kept it in _navbar.scss so navbar styles stay in one file.


a:focus-visible,
button:focus-visible {
outline-color: white;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is sometimes using white and sometimes #fff for styles, would be nice to see just one or the other.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

standardized on $white.

Comment on lines +182 to +183
.dropdown-toggle.btn-outline-primary,
.btn-primary {

@nospame nospame Sep 4, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it a bit odd that we're styling a regular and an outline button identically. Would be nice to keep a distinction or consider changing the classes applied to the buttons themselves.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the language picker renders as plain text under the refresh and Sign In as the outlined button, with Schedule a Demo as the filled one. the nav markup is unchanged because logged-out pages outside the refresh share it.

text-transform: uppercase;
}

.btn-purple {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this make the button blue rather than purple? Might be nice to rename if so, also to see if it's used anywhere else (if not, it could be changed in the definition rather than overridden here).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btn-purple is still used in the logged-in app, so its definition stays. the pre-login buttons use a new btn-prelogin variant instead.

border-radius: 8px;
}

.cloud-choice {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is definitely not used anywhere else and can be changed in its definition, rather than overridden in the .prelogin class.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, changed at the definition.

--#{$prefix}btn-hover-border-color: #{$prelogin-action-blue};
--#{$prefix}btn-active-bg: #{$prelogin-action-blue-tint};
--#{$prefix}btn-active-border-color: #{$prelogin-action-blue};
border-radius: 10px;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bet we could do this or very similar with a bootstrap class, maybe rounded-2? Or just let it have the regular button border radius.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dropped the custom radius, they use the regular button radius now.

kcowger and others added 3 commits September 5, 2026 16:04
White on the action blue #5D70D2 is 4.45:1, below the 4.5:1 minimum for
normal text; the buttons and links on the login and registration cards
move to #4D5EC2 (5.68:1). Placeholder text and the registration step
label move to AA-compliant grays, and keyboard focus gets a visible
outline. The registration stylesheet only loads on pre-login pages, so
no scoping class is needed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Brand-purple nav with the full CommCare by Dimagi logo (reusing the
existing white logo asset), circular sign-up stepper badges, card-style
cloud-location buttons, and a soft warning box, all recolored through
Bootstrap's button-variant mixins. The sign-up and demo bubbles turn
the action blue and are renamed form-bubble-cta to match; their white
call-to-action buttons use a new btn-prelogin variant, applied also to
the dormant bootstrap5 accept-invite template so it is ready when its
view migrates. Styles are changed at their definitions since the
registration stylesheet and the stepper have no other pre-login
consumers; the OAuth consent page shares the registration stylesheet
and intentionally picks up the AA button colors while keeping the
standard navbar.

The shared navbar keeps its markup and gets a prelogin body-class
scope, set by the login template only for logged-out viewers and
inherited by the templates that extend it, so logged-in views of those
pages and logged-out pages outside the refresh keep today's navbar.
Under the scope the language picker renders as plain text, Sign In as
the only outlined button, and Schedule a Demo as a white button.
btn-purple is untouched for its authenticated-app users.

Depends on the palette variables introduced in the preceding WCAG AA
commit; revert them together.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The logo currently links to the homepage view, which redirects
logged-out users back to the login page they are already on. On
Dimagi-run environments, point it at the marketing site instead,
matching where the other pre-login links go. Logged-in users and
self-hosted deployments keep the homepage link.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kcowger
kcowger force-pushed the kc/prelogin-refresh-css branch from 8262757 to 0555176 Compare September 7, 2026 13:52
@kcowger
kcowger requested a review from esoergel as a code owner September 7, 2026 13:52
@kcowger

kcowger commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

restructured so styles are changed at their definitions now. the only override left is the navbar, which the logged-in app shares, scoped under a prelogin body class.

@kcowger
kcowger removed the request for review from esoergel September 7, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product/all-users-all-environments Change impacts all users on all environments Risk: Medium Change affects files that have been flagged as medium risk.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants