Add Keycloak login theme source files #174
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "keycloak-landscaping-theme"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
keycloak-theme/landscaping/login/with theme.properties and login.cssChanges
keycloak-theme/landscaping/login/theme.properties-- extends base keycloak themekeycloak-theme/landscaping/login/resources/css/login.css-- CSS overrides matching app design systemTest Plan
Review Checklist
Related Notes
Closes #173
landscaping-assistant-- project this affectsldraney/pal-e-platform #415(ConfigMap),ldraney/pal-e-services #109(realm config)PR #174 Review
DOMAIN REVIEW
Tech stack: Static CSS (Keycloak login theme overriding PatternFly). Two files:
theme.propertiesandlogin.css. No runtime code, no server logic.Design token parity with application.css:
Every
:roottoken inlogin.csswas compared againstapp/assets/stylesheets/application.css. All 17 shared tokens match exactly:--color-bg#fafafa#fafafa--color-surface#ffffff#ffffff--color-text#1a1a1a#1a1a1a--color-muted#57606a#57606a--color-border#d0d7de#d0d7de--color-accent#2563eb#2563eb--color-accent-hover#1d4ed8#1d4ed8--color-accent-light#ddf4ff#ddf4ff--color-success#16a34a#16a34a--color-success-light#f0fdf4#f0fdf4--color-danger#d1242f#d1242f--color-danger-light#fef2f2#fef2f2--font-bodysystem-ui, -apple-system, sans-serif--max-width30rem30rem--radius8px8px--spacing-*(all 5)Two application.css tokens intentionally omitted from login.css (correct -- neither is used on login pages):
--color-success-hover: #15803d--color-info-light: #f0f9ffHardcoded hex outside :root -- audit passed:
rgba(0, 0, 0, 0.06)/rgba(0, 0, 0, 0.1)in box-shadow: standard CSS shadow pattern, not a design token. Same pattern used throughout application.css.rgba(37, 99, 235, 0.25)/rgba(37, 99, 235, 0.35)in button box-shadow: these are the accent color (#2563eb=rgb(37, 99, 235)) at alpha, exactly matching the.login-btn/.login-btn:hovershadows in application.css (lines 1713-1718). CSS variables cannot be used insidergba()withoutcolor-mix()which has narrower support. Acceptable.stroke='%232563eb'in SVG data URI: URL-encoded#2563eb. CSS custom properties cannot resolve inside data URIs. This is the only viable pattern. Acceptable.color: whiteon submit button text: matchesapplication.cssline 89 (.btn-accent { color: white; }). Acceptable.No rogue hardcoded colors found.
SVG data URI security review:
The SVG is a simple plant icon with four
<path>elements, no<script>, no<foreignObject>, no event handlers, no external references. It uses onlystroke,fill='none',stroke-width,stroke-linecap,stroke-linejoin. This is safe.!important usage:
Every
!importanttargets a Keycloak/PatternFly selector that would otherwise win specificity (PatternFly uses high-specificity selectors and its own!importantdeclarations). This is the standard pattern for Keycloak theme overrides. The usage is disciplined --!importantappears only on declarations that override PatternFly defaults, not on internal relationships between theme rules.theme.properties:
parent=keycloak-- correctly extends the base themeimport=common/keycloak-- imports shared Keycloak resourcesstyles=css/login.css-- path matches the file locationComponent parity with app login page:
The CSS mirrors the app's login component structure: centered card, 5rem plant icon, 1.75rem/700 title, same form field styling (0.9rem/700 labels, 1px border, 8px radius, 3px accent focus ring), same submit button (1.2rem/700, accent background, matching box-shadows), same alert color scheme (danger-light/success-light/accent-light backgrounds).
Mobile responsive:
The
@media (max-width: 480px)breakpoint removes card border and shadow, reduces padding -- appropriate for the login form on small screens.BLOCKERS
None.
This is a static CSS file with no runtime code, no user input processing, no secrets, and no server-side logic. The BLOCKER criteria (test coverage, input validation, secrets, auth duplication) do not apply to static theme assets. The CSS is purely presentational.
NITS
DRY opportunity (non-blocking): The
:roottoken block is duplicated betweenapplication.cssandlogin.css. If these ever drift, the login page will look different from the app. Consider a comment in both files referencing the other as the source of truth, or a future build step to extract shared tokens. The current approach (copy with a header comment noting the mirror) is pragmatic for now since Keycloak themes cannot import Rails asset pipeline CSS.#kc-page-titlestyled twice (non-blocking):#kc-page-titleis hidden viadisplay: none !importanton line 54, then styled with font properties on lines 133-142. The styling block is dead code since the element is hidden. This is harmless but could confuse a future maintainer -- a comment noting the title section styles.kc-page-title(class) for themes that show it would clarify intent.SOP COMPLIANCE
keycloak-landscaping-theme-- does not follow{issue-number}-{kebab-case}convention (should be173-keycloak-landscaping-theme). Non-blocking for static CSS assets.pal-e-platform #415,pal-e-services #109)PROCESS OBSERVATIONS
#415) to mount the files into Keycloak. The PR correctly documents this cross-repo dependency.:rootblock creates a maintenance surface. When application.css tokens change, login.css must be updated manually. This is an accepted trade-off documented in the header comment.VERDICT: APPROVED