Define a major-third (1.25) type scale as CSS custom properties in the tokens layer (--text-2xs through --text-5xl), along with line-height (--leading-*), font-weight (--font-*), and letter-spacing (--tracking-*) tokens. Migrate all 28 core CSS files from ad-hoc values to token references with clamp()-based responsive scaling for headings. Add TypographyTokenContractTest to enforce token-only usage via grep-based assertions. Task run: UI-TYPOGRAPHY-SCALE-001 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
103 lines
2.4 KiB
CSS
103 lines
2.4 KiB
CSS
@layer components {
|
|
/* Form element enhancements — validation hints, color inputs, checkbox/radio labels, disabled states. */
|
|
.form-hint {
|
|
font-size: var(--text-sm);
|
|
}
|
|
|
|
ul.form-hint-list {
|
|
margin: 0;
|
|
padding-left: var(--app-spacing);
|
|
}
|
|
|
|
ul.form-hint-list li {
|
|
margin: 0;
|
|
}
|
|
|
|
ul.form-hint-list li.is-valid {
|
|
color: var(--app-form-element-valid-border-color);
|
|
}
|
|
|
|
ul.form-hint-list li.is-invalid {
|
|
color: var(--app-form-element-invalid-border-color);
|
|
}
|
|
|
|
ul.form-hint-list li.is-valid:after {
|
|
content: "\F26B";
|
|
font-family: "Bootstrap-icons";
|
|
margin-left: 4px;
|
|
font-size: 10px; /* icon-font metric — intentional px */
|
|
}
|
|
|
|
ul.form-hint-list li.is-invalid:after {
|
|
content: "\F33A";
|
|
font-family: "Bootstrap-icons";
|
|
margin-left: 4px;
|
|
font-size: 10px; /* icon-font metric — intentional px */
|
|
}
|
|
|
|
label:has([type="checkbox"], [type="radio"]) {
|
|
display: flex;
|
|
line-height: var(--leading-none);
|
|
align-items: center;
|
|
}
|
|
|
|
input[type="color"] {
|
|
padding: 0;
|
|
width: 42px;
|
|
border: 0;
|
|
margin: 0;
|
|
height: 42px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
label:has(input[type="color"]) {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
small.muted {
|
|
display: block;
|
|
width: 100%;
|
|
color: var(--app-muted-color);
|
|
}
|
|
a.muted {
|
|
color: var(--app-muted-color);
|
|
}
|
|
|
|
label.app-field:has(input[type="checkbox"][disabled]),
|
|
label.app-field:has(input[type="radio"][disabled]) {
|
|
cursor: not-allowed;
|
|
opacity: 0.8;
|
|
}
|
|
|
|
label.app-field:has(input[type="checkbox"][disabled]) > span,
|
|
label.app-field:has(input[type="radio"][disabled]) > span {
|
|
color: var(--app-muted-color);
|
|
}
|
|
|
|
input[type="checkbox"][disabled],
|
|
input[type="radio"][disabled] {
|
|
--app-border-color: var(--app-muted-border-color);
|
|
--app-background-color: var(--app-form-element-background-color);
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
input[type="checkbox"][disabled]:checked,
|
|
input[type="checkbox"][disabled]:indeterminate,
|
|
input[type="radio"][disabled]:checked {
|
|
--app-border-color: var(--app-muted-border-color);
|
|
--app-background-color: var(--app-muted-border-color);
|
|
}
|
|
|
|
fieldset[aria-disabled="true"] {
|
|
border-color: var(--app-muted-border-color);
|
|
}
|
|
|
|
fieldset[aria-disabled="true"] .muted,
|
|
fieldset[aria-disabled="true"] legend small {
|
|
color: var(--app-muted-color);
|
|
}
|
|
|
|
}
|