Add feedback, layout, button, and interaction utilities
This commit is contained in:
@@ -20,10 +20,16 @@
|
||||
:where(.frost-button--secondary) { border-color: var(--frost-color-border-strong); background: var(--frost-color-surface); color: var(--frost-color-text); }
|
||||
:where(.frost-button--ghost) { border-color: transparent; color: var(--frost-color-accent); }
|
||||
:where(.frost-button--danger) { border-color: var(--frost-color-danger); background: var(--frost-color-danger); color: #fff; }
|
||||
:where(.frost-button--success) { border-color: var(--frost-color-success); background: var(--frost-color-success); color: var(--frost-color-on-success); }
|
||||
:where(.frost-button--link) { min-height: auto; padding: 0; border-color: transparent; color: var(--frost-color-accent); text-decoration: underline; text-underline-offset: 0.15em; }
|
||||
:where(.frost-button--block) { width: 100%; }
|
||||
:where(.frost-button--lg) { min-height: 3rem; padding: var(--frost-space-3) var(--frost-space-5); font-size: var(--frost-font-size-lg); }
|
||||
:where(.frost-button--primary:hover:not(:disabled):not([aria-disabled="true"])) { background: var(--frost-color-accent-hover); border-color: var(--frost-color-accent-hover); }
|
||||
:where(.frost-button--secondary:hover:not(:disabled):not([aria-disabled="true"])) { background: var(--frost-color-surface-hover); }
|
||||
:where(.frost-button--ghost:hover:not(:disabled):not([aria-disabled="true"])) { background: var(--frost-color-surface-soft); }
|
||||
:where(.frost-button--danger:hover:not(:disabled):not([aria-disabled="true"])) { filter: brightness(0.92); }
|
||||
:where(.frost-button--success:hover:not(:disabled):not([aria-disabled="true"])) { filter: brightness(0.92); }
|
||||
:where(.frost-button--link:hover:not(:disabled):not([aria-disabled="true"])) { background: var(--frost-color-surface-soft); }
|
||||
:where(.frost-button:active:not(:disabled):not([aria-disabled="true"])) { transform: translateY(1px); }
|
||||
:where(.frost-button:disabled, .frost-button[aria-disabled="true"]) { opacity: 0.55; cursor: not-allowed; }
|
||||
:where(.frost-button--sm) { min-height: 2rem; padding: var(--frost-space-1) var(--frost-space-2); font-size: var(--frost-font-size-sm); }
|
||||
@@ -47,11 +53,21 @@
|
||||
:where(.frost-input:focus, .frost-select:focus, .frost-textarea:focus) { border-color: var(--frost-focus-color); box-shadow: 0 0 0 var(--frost-focus-width) rgb(37 99 235 / 0.22); box-shadow: 0 0 0 var(--frost-focus-width) color-mix(in srgb, var(--frost-focus-color) 22%, transparent); }
|
||||
:where(.frost-input:disabled, .frost-select:disabled, .frost-textarea:disabled) { background: var(--frost-color-surface-soft); opacity: 0.65; }
|
||||
:where(.frost-input[aria-invalid="true"], .frost-select[aria-invalid="true"], .frost-textarea[aria-invalid="true"]) { border-color: var(--frost-color-danger); }
|
||||
:where(.frost-input[aria-invalid="true"]:focus, .frost-select[aria-invalid="true"]:focus, .frost-textarea[aria-invalid="true"]:focus) { box-shadow: 0 0 0 var(--frost-focus-width) color-mix(in srgb, var(--frost-color-danger) 22%, transparent); }
|
||||
:where(.frost-input[aria-busy="true"], .frost-select[aria-busy="true"], .frost-textarea[aria-busy="true"]) { background-image: linear-gradient(90deg, transparent, var(--frost-color-surface-soft), transparent); background-size: 200% 100%; animation: frost-control-loading 1.2s linear infinite; }
|
||||
:where(.frost-input--success, .frost-select--success, .frost-textarea--success, .frost-input[aria-invalid="false"], .frost-select[aria-invalid="false"], .frost-textarea[aria-invalid="false"]) { border-color: var(--frost-color-success); }
|
||||
:where(.frost-input--warning, .frost-select--warning, .frost-textarea--warning) { border-color: var(--frost-color-warning); }
|
||||
:where(.frost-input--readonly, .frost-input[readonly]) { background: var(--frost-color-surface-soft); }
|
||||
:where(.frost-field--disabled) { opacity: 0.65; }
|
||||
|
||||
.frost-field { display: grid; gap: var(--frost-space-2); }
|
||||
.frost-label { color: var(--frost-color-text); font-weight: 650; }
|
||||
.frost-help, .frost-error { font-size: var(--frost-font-size-sm); }
|
||||
.frost-help { color: var(--frost-color-text-muted); }
|
||||
.frost-error { color: var(--frost-color-danger); }
|
||||
.frost-success { color: var(--frost-color-success); }
|
||||
.frost-warning { color: var(--frost-color-warning); }
|
||||
|
||||
@keyframes frost-control-loading { to { background-position: -200% 0; } }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user