- button.css: replaced with go-backend multi-class selector version + ghost variant rules
- badge.css: replaced with go-backend pill-shape version + primary variant
- card.css: replaced with go-backend token-based header/body/footer version
- card.templ: migrated from children passthrough to typed CardProps{Header/Body/Footer}
- ui_test.go: rewrote TestCard_RendersChildren -> TestCard_RendersTypedRegions; added TestBadge_PrimaryVariant; added textComponent helper + io import
- auth_login.templ, auth_signup.templ: migrated Card usage to typed CardProps API
- tablos.templ: migrated TabloCard to typed CardProps API with extracted tabloCardBody
- planning.templ, tasks.templ, events.templ, etapes.templ: all compound button class strings updated to multi-class pattern
- go test ./... passes (all packages green)
- just generate succeeds
194 lines
4.6 KiB
CSS
194 lines
4.6 KiB
CSS
/* button.css — multi-class selector pattern ported from go-backend.
|
|
* No CSS nesting: all pseudo-class rules are top-level selectors.
|
|
*/
|
|
|
|
.ui-button {
|
|
align-items: center;
|
|
border: 0;
|
|
border-radius: 0.35rem;
|
|
cursor: pointer;
|
|
display: inline-flex;
|
|
font-weight: 600;
|
|
gap: 0.5rem;
|
|
justify-content: center;
|
|
line-height: 1;
|
|
min-height: 44px;
|
|
text-decoration: none;
|
|
transition:
|
|
background-color 0.2s ease,
|
|
color 0.2s ease,
|
|
box-shadow 0.2s ease,
|
|
opacity 0.2s ease;
|
|
}
|
|
|
|
.ui-button-icon,
|
|
.ui-button-icon svg {
|
|
height: 1rem;
|
|
width: 1rem;
|
|
}
|
|
|
|
.ui-button:focus-visible {
|
|
box-shadow: 0 0 0 3px var(--color-focus-ring);
|
|
outline: none;
|
|
}
|
|
|
|
.ui-button-sm {
|
|
font-size: 0.875rem;
|
|
min-height: 40px;
|
|
padding: 0.625rem 0.9rem;
|
|
}
|
|
|
|
.ui-button-md {
|
|
font-size: 0.95rem;
|
|
padding: 0.7rem 1rem;
|
|
}
|
|
|
|
.ui-button-lg {
|
|
font-size: 1rem;
|
|
padding: 0.82rem 1.15rem;
|
|
}
|
|
|
|
.ui-button-solid.ui-button-default {
|
|
background: var(--color-brand-primary);
|
|
color: var(--color-brand-foreground, var(--color-text-inverse));
|
|
}
|
|
|
|
.ui-button-solid.ui-button-default:hover {
|
|
background: var(--color-brand-primary-hover);
|
|
}
|
|
|
|
.ui-button-solid.ui-button-default:active {
|
|
background: var(--color-brand-primary-active);
|
|
}
|
|
|
|
.ui-button-solid.ui-button-neutral {
|
|
background: var(--color-surface-muted);
|
|
color: var(--color-text-primary);
|
|
}
|
|
|
|
.ui-button-solid.ui-button-neutral:hover {
|
|
background: var(--color-surface-muted-hover);
|
|
}
|
|
|
|
.ui-button-solid.ui-button-neutral:active {
|
|
background: var(--color-surface-muted-active);
|
|
}
|
|
|
|
.ui-button-solid.ui-button-warning {
|
|
background: var(--color-status-warning-strong);
|
|
color: var(--color-status-warning-strong-foreground);
|
|
}
|
|
|
|
.ui-button-solid.ui-button-warning:hover {
|
|
background: var(--color-status-warning-strong-hover);
|
|
}
|
|
|
|
.ui-button-solid.ui-button-warning:active {
|
|
background: var(--color-status-warning-strong-active);
|
|
}
|
|
|
|
.ui-button-solid.ui-button-success {
|
|
background: var(--color-status-success-strong);
|
|
color: var(--color-status-success-strong-foreground);
|
|
}
|
|
|
|
.ui-button-solid.ui-button-success:hover {
|
|
background: var(--color-status-success-strong-hover);
|
|
}
|
|
|
|
.ui-button-solid.ui-button-success:active {
|
|
background: var(--color-status-success-strong-active);
|
|
}
|
|
|
|
.ui-button-solid.ui-button-danger {
|
|
background: var(--color-status-danger-strong);
|
|
color: var(--color-status-danger-strong-foreground);
|
|
}
|
|
|
|
.ui-button-solid.ui-button-danger:hover {
|
|
background: var(--color-status-danger-strong-hover);
|
|
}
|
|
|
|
.ui-button-solid.ui-button-danger:active {
|
|
background: var(--color-status-danger-strong-active);
|
|
}
|
|
|
|
.ui-button-soft.ui-button-default {
|
|
background: var(--color-surface-brand-soft);
|
|
color: var(--color-brand-primary-hover);
|
|
}
|
|
|
|
.ui-button-soft.ui-button-default:hover {
|
|
background: var(--color-surface-brand-soft-hover);
|
|
}
|
|
|
|
.ui-button-soft.ui-button-default:active {
|
|
background: var(--color-surface-brand-soft-active);
|
|
}
|
|
|
|
.ui-button-soft.ui-button-warning {
|
|
background: var(--color-status-warning-soft-bg);
|
|
color: var(--color-status-warning-soft-foreground-strong);
|
|
}
|
|
|
|
.ui-button-soft.ui-button-warning:hover {
|
|
background: var(--color-status-warning-soft-bg-hover);
|
|
}
|
|
|
|
.ui-button-soft.ui-button-warning:active {
|
|
background: var(--color-status-warning-soft-bg-active);
|
|
}
|
|
|
|
.ui-button-soft.ui-button-success {
|
|
background: var(--color-status-success-soft-bg);
|
|
color: var(--color-status-success-soft-foreground-strong);
|
|
}
|
|
|
|
.ui-button-soft.ui-button-success:hover {
|
|
background: var(--color-status-success-soft-bg-hover);
|
|
}
|
|
|
|
.ui-button-soft.ui-button-success:active {
|
|
background: var(--color-status-success-soft-bg-active);
|
|
}
|
|
|
|
.ui-button-soft.ui-button-danger {
|
|
background: var(--color-status-danger-soft-bg-alt);
|
|
color: var(--color-status-danger-soft-foreground-strong);
|
|
}
|
|
|
|
.ui-button-soft.ui-button-danger:hover {
|
|
background: var(--color-status-danger-soft-bg-hover);
|
|
}
|
|
|
|
.ui-button-soft.ui-button-danger:active {
|
|
background: var(--color-status-danger-soft-bg-active);
|
|
}
|
|
|
|
/* Ghost variant — new in Phase 13, D-CA01 */
|
|
.ui-button-ghost {
|
|
background: transparent;
|
|
color: var(--color-brand-primary);
|
|
}
|
|
|
|
.ui-button-ghost:hover {
|
|
background: var(--color-surface-brand-soft);
|
|
}
|
|
|
|
.ui-button-ghost:focus-visible {
|
|
box-shadow: 0 0 0 3px var(--color-focus-ring);
|
|
outline: none;
|
|
}
|
|
|
|
.ui-button-soft.ui-button-neutral {
|
|
background: var(--color-surface-muted);
|
|
color: var(--color-text-secondary);
|
|
}
|
|
|
|
.ui-button-soft.ui-button-neutral:hover {
|
|
background: var(--color-surface-muted-hover);
|
|
}
|
|
|
|
.ui-button-soft.ui-button-neutral:active {
|
|
background: var(--color-surface-muted-active);
|
|
}
|