// Kbd -- a keyboard key. // // // // Deliberately small. A kbd element is a kbd element; the work here is making // it look like a key and follow the theme. // // NOTE: the style block uses /* */ comments only -- // is not a CSS comment // and silently swallows the rule that follows it. component Kbd { props { size: string = "default" color: string = "primary" label: string = "K" class: string = "" } view { {label} } style { .wrn-kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 1.5rem; height: 1.5rem; padding: 0 0.4rem; border: 1px solid var(--wrn-color-border); border-bottom-color: var(--wrn-color-border-strong, var(--wrn-color-border)); border-bottom-width: 2px; border-radius: 0.375rem; background: linear-gradient(180deg, var(--wrn-color-surface), var(--wrn-color-surface-soft, var(--wrn-color-surface))); box-shadow: var(--wrn-highlight-edge, none), 0 1px 1px rgb(0 0 0 / 0.05); color: var(--wrn-color-text-muted, var(--wrn-color-text)); font-family: var(--wrn-font-mono, monospace); font-size: 0.72rem; font-weight: 600; line-height: 1; } .wrn-kbd[data-size="sm"] { min-width: 1.4rem; padding: 0.1rem 0.3rem; font-size: 0.7rem; } .wrn-kbd[data-size="lg"] { min-width: 2rem; padding: 0.3rem 0.55rem; font-size: 0.9rem; } } }