Skip to content

feat(login): configurable logo size + hideable heading/subtitle#521

Merged
rathlinus merged 1 commit into
bulwarkmail:mainfrom
maartendra:feat/login-header-customization
Jul 4, 2026
Merged

feat(login): configurable logo size + hideable heading/subtitle#521
rathlinus merged 1 commit into
bulwarkmail:mainfrom
maartendra:feat/login-header-customization

Conversation

@maartendra

Copy link
Copy Markdown
Contributor

What

Login header customization for white-label deployments — three env knobs, all defaults preserving current behaviour:

  • LOGIN_LOGO_MAX_HEIGHT / LOGIN_LOGO_MAX_WIDTH (any CSS length, e.g. 230px, 3rem) — size the login logo.
  • LOGIN_SHOW_HEADING (default true) — show/hide the {appName} <h1>.
  • LOGIN_SHOW_SUBTITLE (default true) — show/hide the subtitle.

Refs #519.

Why

Operators who brand with a wordmark logo hit two issues:

  1. The logo box is a fixed 64×64 (w-16 h-16, max-w-16 max-h-16), so a wide wordmark gets object-contain-fitted to 64px wide → renders only ~13px tall (tiny). There's no setting for size.
  2. The {appName} heading + subtitle are redundant when the logo already spells out the brand, but can't be turned off (the theme system is color-tokens-only, so CSS can't reach them either).

We currently work around both by injecting <style> at our reverse proxy, which couples to Bulwark's login DOM/classes and needs re-verifying on every upgrade.

How

  • When LOGIN_LOGO_MAX_HEIGHT/WIDTH is set, the fixed w-16 h-16 box and max-w-16 max-h-16 are dropped and the configured max dimensions are applied inline; unset = unchanged 64×64.
  • LOGIN_SHOW_HEADING / LOGIN_SHOW_SUBTITLE gate the <h1> / <p>.
  • Wired through the existing config flow (CONFIG_ENV_MAP/api/configuseConfig), matching the surrounding LOGIN_* options. Applied to the standard login header (demo mode has its own header layout).

Notes

Login header customization for white-label deployments, all defaults
preserve current behaviour:

- LOGIN_LOGO_MAX_HEIGHT / LOGIN_LOGO_MAX_WIDTH (any CSS length): the logo
  box is otherwise a fixed 64x64 (w-16/h-16), which fits a wide wordmark to
  ~13px tall. When either is set, the fixed box is dropped and the logo
  renders at the configured size.
- LOGIN_SHOW_HEADING / LOGIN_SHOW_SUBTITLE (default true): hide the
  {appName} heading and/or the subtitle when the logo already reads as the
  brand (e.g. a wordmark) and they'd be redundant.

Applied to the standard login header; wired through the existing config
registry (CONFIG_ENV_MAP) -> /api/config -> useConfig.

Refs bulwarkmail#519.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants