forked from fa/breadcrumb-the-shire
Create typography.tokens.css as single source of truth for the type system: - Extract all primitive tokens from variables.base.css (--text-*, --leading-*, --font-*, --tracking-*) - Add semantic aliases (--text-body, --text-label, --text-caption, --text-title, --text-page-title) - Add --text-md (15px) escape hatch and --tracking-wider (0.05em) token - Add prefers-reduced-motion fallbacks locking fluid headings to fixed midpoints - Document scale ratio (1.25x major third, 14px base) with reference table - Migrate h1/h2 in app-shell.css to semantic aliases - Migrate 4 raw letter-spacing values to --tracking-* tokens - Extend TypographyTokenContractTest with 3 new tests (letter-spacing, aliases, reduced-motion) 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: var(--tracking-wide);
|
|
background: var(--app-blockquote-background-color);
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
.app-tiles {
|
|
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
|
}
|
|
}
|
|
}
|