web-ui: wave-1 foundation — services/web-ui/src/css/components/button.css
This commit is contained in:
parent
30cb6663dd
commit
c08025eeb2
1 changed files with 73 additions and 0 deletions
73
services/web-ui/src/css/components/button.css
Normal file
73
services/web-ui/src/css/components/button.css
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
/* button.css ─ sm/md/lg × primary/secondary/ghost/danger */
|
||||
|
||||
.wd-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid transparent;
|
||||
font: 500 13px/1 var(--font);
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
transition: background-color 120ms cubic-bezier(0.25, 1, 0.5, 1),
|
||||
border-color 120ms cubic-bezier(0.25, 1, 0.5, 1),
|
||||
color 120ms cubic-bezier(0.25, 1, 0.5, 1);
|
||||
}
|
||||
.wd-btn:focus-visible {
|
||||
outline: 2px solid var(--accent-subtle);
|
||||
outline-offset: 1px;
|
||||
}
|
||||
.wd-btn:active:not(:disabled) { opacity: 0.85; transition: opacity 60ms; }
|
||||
.wd-btn:disabled {
|
||||
opacity: 0.4;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.wd-btn > svg { width: 12px; height: 12px; flex-shrink: 0; }
|
||||
|
||||
/* Sizes */
|
||||
.wd-btn--sm { height: 28px; padding: 0 10px; font-size: 12px; }
|
||||
.wd-btn--md { height: 32px; padding: 0 12px; font-size: 13px; }
|
||||
.wd-btn--lg { height: 36px; padding: 0 14px; font-size: 13px; }
|
||||
|
||||
/* Variants */
|
||||
.wd-btn--primary {
|
||||
background: var(--accent);
|
||||
color: oklch(98% 0.005 266);
|
||||
}
|
||||
.wd-btn--primary:hover:not(:disabled) {
|
||||
background: oklch(52% 0.20 266);
|
||||
}
|
||||
|
||||
.wd-btn--secondary {
|
||||
background: var(--bg-surface);
|
||||
color: var(--text-primary);
|
||||
border-color: var(--border);
|
||||
}
|
||||
.wd-btn--secondary:hover:not(:disabled) {
|
||||
background: var(--bg-hover);
|
||||
border-color: var(--border-strong);
|
||||
}
|
||||
|
||||
.wd-btn--ghost {
|
||||
background: transparent;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
.wd-btn--ghost:hover:not(:disabled) {
|
||||
background: var(--bg-hover);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.wd-btn--danger {
|
||||
background: var(--signal-bad);
|
||||
color: oklch(98% 0.005 25);
|
||||
}
|
||||
.wd-btn--danger:hover:not(:disabled) {
|
||||
background: oklch(68% 0.22 25);
|
||||
}
|
||||
|
||||
/* Icon-only (28px square) */
|
||||
.wd-btn--icon {
|
||||
width: 28px;
|
||||
padding: 0;
|
||||
}
|
||||
Loading…
Reference in a new issue