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>
142 lines
3.3 KiB
CSS
142 lines
3.3 KiB
CSS
@layer components {
|
|
/* Info tiles — key-value display cards used in detail page sidebars. */
|
|
.app-tiles {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
|
gap: calc(var(--app-spacing) * 1);
|
|
margin-bottom: calc(var(--app-spacing) * 2);
|
|
}
|
|
|
|
.app-stats-table {
|
|
overflow: auto;
|
|
border: 1px solid var(--app-border);
|
|
border-radius: var(--app-border-radius);
|
|
margin-bottom: calc(var(--app-spacing) * 1);
|
|
}
|
|
|
|
.app-stats-table th {
|
|
border-top: 0;
|
|
}
|
|
|
|
.app-stats-table table {
|
|
margin: 0;
|
|
}
|
|
|
|
.app-stats-table table tr:last-child td {
|
|
border-bottom: 0;
|
|
}
|
|
|
|
.app-stats-table-empty {
|
|
padding: var(--app-spacing);
|
|
}
|
|
|
|
.app-stats-table-explanation {
|
|
padding: var(--app-spacing);
|
|
}
|
|
|
|
.app-tile {
|
|
--tile-icon-bg: var(--app-tile-icon-bg);
|
|
--tile-icon-color: var(--app-tile-icon-color);
|
|
--tile-count-color: var(--app-tile-count-color);
|
|
--tile-label-color: var(--app-tile-label-color);
|
|
--tile-link-color: var(--app-tile-link-color);
|
|
position: relative;
|
|
display: block;
|
|
padding: calc(var(--app-spacing) * 1);
|
|
border: 1px solid var(--app-tile-border);
|
|
border-radius: calc(var(--app-border-radius) * 1.1);
|
|
background: var(--app-tile-bg);
|
|
color: var(--app-tile-label-color);
|
|
text-decoration: none;
|
|
transition:
|
|
transform var(--app-transition),
|
|
box-shadow var(--app-transition),
|
|
border-color var(--app-transition);
|
|
}
|
|
|
|
.app-tile:hover {
|
|
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
|
|
}
|
|
|
|
.app-tile-icon {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 36px;
|
|
height: 36px;
|
|
border-radius: 10px;
|
|
background: var(--tile-icon-bg);
|
|
color: var(--tile-icon-color);
|
|
font-size: var(--text-lg);
|
|
}
|
|
|
|
.app-tile-count {
|
|
position: absolute;
|
|
top: calc(var(--app-spacing) * 1);
|
|
right: calc(var(--app-spacing) * 1);
|
|
font-weight: var(--font-bold);
|
|
color: var(--tile-count-color);
|
|
}
|
|
|
|
.app-tile-label {
|
|
display: block;
|
|
margin-top: calc(var(--app-spacing) * 1);
|
|
color: var(--tile-label-color);
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
max-width: 191px;
|
|
}
|
|
|
|
.app-tile-link {
|
|
position: absolute;
|
|
right: calc(var(--app-spacing) * 1);
|
|
bottom: calc(var(--app-spacing) * 1);
|
|
color: var(--tile-link-color);
|
|
font-size: var(--text-sm);
|
|
}
|
|
|
|
.app-tile.is-small {
|
|
padding: 10px;
|
|
display: flex;
|
|
align-items: center;
|
|
min-height: 50px;
|
|
}
|
|
.app-tile.is-small span.app-tile-icon {
|
|
width: 25px;
|
|
height: 25px;
|
|
border-radius: 6px;
|
|
font-size: 12px; /* icon-font metric — intentional px */
|
|
margin-right: 10px;
|
|
}
|
|
|
|
.app-tile.is-small .app-tile-link {
|
|
bottom: 14px;
|
|
}
|
|
|
|
.app-tile.is-small .app-tile-count {
|
|
position: static;
|
|
margin-right: 5px;
|
|
display: block;
|
|
}
|
|
.app-tile.is-small .app-tile-label {
|
|
margin-top: 0;
|
|
font-weight: var(--font-regular);
|
|
}
|
|
|
|
.app-stats-table-header {
|
|
border-bottom: 1px solid var(--app-border);
|
|
padding: 4px 10px 4px 10px;
|
|
text-transform: uppercase;
|
|
font-size: var(--text-sm);
|
|
letter-spacing: 0.4px;
|
|
background: var(--app-blockquote-background-color);
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
.app-tiles {
|
|
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
|
}
|
|
}
|
|
}
|