mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-19 00:10:00 +00:00
Extends the 4px-grid spacing scale with --space-0-5 (2px), --space-1 (4px) and --space-1-5 (6px) and replaces the literal 2/4/6/8/12/16px gap, row-gap and column-gap values with the tokens; computed values are unchanged. src/styles/spacingScale.test.ts flags an on-scale literal gap. Co-authored-by: Mr0Bread <55754540+Mr0Bread@users.noreply.github.com>
134 lines
2.7 KiB
CSS
134 lines
2.7 KiB
CSS
/* TextField / SearchField: Component.arc 8 (radius 4), 28px, accent border + ring when focused. */
|
|
.input {
|
|
height: var(--h-field, 28px);
|
|
min-width: 0;
|
|
padding: 0 8px;
|
|
/* No UA frame (WebKit draws one for native text fields); the frame is the box-shadow below. */
|
|
appearance: none;
|
|
border: 0;
|
|
background: var(--bg-input);
|
|
color: var(--fg-strong);
|
|
font-size: var(--fs-ui);
|
|
outline: none;
|
|
-webkit-user-select: text;
|
|
user-select: text;
|
|
}
|
|
.input::placeholder,
|
|
.searchInput::placeholder {
|
|
color: var(--fg-faint);
|
|
}
|
|
.mono {
|
|
font-family: var(--font-mono);
|
|
}
|
|
.framed {
|
|
border-radius: var(--radius-control, 4px);
|
|
background: var(--bg-field, var(--bg-button));
|
|
box-shadow: inset 0 0 0 1px var(--border-button);
|
|
transition: box-shadow var(--dur-fast) var(--ease);
|
|
}
|
|
.framed:focus,
|
|
.framed:focus-within {
|
|
box-shadow:
|
|
inset 0 0 0 1px var(--focus-ring),
|
|
0 0 0 1px var(--focus-ring);
|
|
}
|
|
.framed:disabled {
|
|
background: transparent;
|
|
color: var(--fg-faint);
|
|
box-shadow: inset 0 0 0 1px var(--border);
|
|
}
|
|
.bare {
|
|
border: 0;
|
|
padding: 0;
|
|
background: none;
|
|
}
|
|
.input[aria-invalid="true"].framed,
|
|
.invalid.framed {
|
|
box-shadow:
|
|
inset 0 0 0 1px var(--danger),
|
|
0 0 0 1px var(--danger);
|
|
}
|
|
|
|
.searchField {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-0-5);
|
|
height: var(--h-field, 28px);
|
|
min-width: 0;
|
|
padding: 0 4px 0 8px;
|
|
}
|
|
.leading {
|
|
color: var(--fg-muted);
|
|
margin-right: 4px;
|
|
}
|
|
.searchInput {
|
|
flex: 1;
|
|
min-width: 0;
|
|
height: 100%;
|
|
appearance: none;
|
|
border: 0;
|
|
outline: none;
|
|
background: none;
|
|
color: var(--fg-strong);
|
|
font-size: var(--fs-ui);
|
|
-webkit-user-select: text;
|
|
user-select: text;
|
|
}
|
|
.input:focus-visible,
|
|
.searchInput:focus-visible {
|
|
/* The frame's focus ring stands in for the global :focus-visible outline. */
|
|
outline: none;
|
|
}
|
|
.multiline {
|
|
height: auto;
|
|
align-items: flex-start;
|
|
padding-block: 4px;
|
|
}
|
|
.multiline .leading {
|
|
margin-top: 3px;
|
|
}
|
|
.searchArea {
|
|
resize: none;
|
|
font-family: inherit;
|
|
line-height: 20px;
|
|
padding: 0;
|
|
}
|
|
/* A multi-line capable field holding one line looks like a text input. */
|
|
.searchAreaSingle {
|
|
height: 20px;
|
|
overflow: hidden;
|
|
}
|
|
.leading:is(button) {
|
|
margin-right: 2px;
|
|
margin-left: -4px;
|
|
}
|
|
.invalid .searchInput {
|
|
color: var(--danger);
|
|
}
|
|
.large {
|
|
height: 38px;
|
|
padding: 0 8px 0 12px;
|
|
gap: var(--space-1-5);
|
|
}
|
|
.large .searchInput {
|
|
font-size: var(--fs-input-large);
|
|
color: var(--fg-strong);
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.framed {
|
|
transition: none;
|
|
}
|
|
}
|
|
|
|
/* Box-shadow frames vanish in forced-colors (high contrast) mode. */
|
|
@media (forced-colors: active) {
|
|
.framed {
|
|
border: 1px solid FieldText;
|
|
}
|
|
.framed:focus,
|
|
.framed:focus-within {
|
|
outline: 2px solid Highlight;
|
|
}
|
|
}
|