xtablo-source/backend/internal/web/ui/button.css
Arthur Belleville d056b33241 feat(01-02): add Button, Card, Badge templ components + CSS
- button.templ: Button(ButtonProps) renders <button type=...> with class
  from ui.ButtonClass(); Attrs spread for hx-* pass-through
- button.css: .ui-button base + .ui-button-solid-default-md variant
  with non-nested :hover and :focus-visible (Codex concern #7)
- card.templ: Card(attrs) accepts children via templ child syntax
- card.css: slate-50 panel, slate-200 border
- badge.templ: Badge(BadgeProps) renders <span class=...>
- badge.css: info / success / danger variants (warning deferred)
2026-05-14 18:46:42 +02:00

47 lines
1,016 B
CSS

/* button.css — Phase 1 ships only solid / default / md.
* Codex concern #7: no CSS nesting (`&:hover`). All pseudo-class rules are
* declared as top-level selectors so the file is portable across every
* Tailwind v4 standalone processing mode.
*/
.ui-button {
display: inline-flex;
align-items: center;
font-family: inherit;
font-size: 1rem;
line-height: 1.25;
border: 1px solid transparent;
cursor: pointer;
user-select: none;
text-decoration: none;
}
.ui-button:focus-visible {
outline: 2px solid #1d4ed8;
outline-offset: 2px;
}
.ui-button.htmx-request {
opacity: 0.6;
pointer-events: none;
}
.ui-button-solid-default-md {
display: inline-flex;
align-items: center;
border-radius: 0.375rem;
background-color: #2563eb;
padding: 0.5rem 1rem;
font-size: 1rem;
font-weight: 600;
color: #ffffff;
}
.ui-button-solid-default-md:hover {
background-color: #1d4ed8;
}
.ui-button-solid-default-md:focus-visible {
outline: 2px solid #1d4ed8;
outline-offset: 2px;
}