Files
breadcrumb-the-shire/web/css/components/app-search.css
fs e145b7d089 feat: introduce mathematical type scale with single-source-of-truth typography tokens
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>
2026-03-22 15:47:55 +01:00

178 lines
3.6 KiB
CSS

@layer components {
/* Global sidebar search — input, result list, preview rows, and search result cards. */
.app-search {
position: relative;
padding: 0 var(--app-spacing);
margin-bottom: var(--app-spacing);
}
.app-search-shortcut {
position: absolute;
right: calc(var(--app-spacing) + 0.5rem);
top: 50%;
transform: translateY(-50%);
border: 1px solid var(--app-border);
border-radius: 6px;
background: var(--app-card-background-color);
color: var(--app-muted-color);
font-size: var(--text-xs);
line-height: var(--leading-none);
padding: 0.2rem 0.4rem;
pointer-events: none;
}
.app-search-empty-state {
margin: var(--app-spacing);
padding: 1rem;
border: 1px dashed var(--app-border);
border-radius: var(--app-border-radius);
text-align: center;
color: var(--app-muted-color);
font-size: var(--text-sm);
cursor: text;
}
.app-search-empty-state .bi-search {
display: inline-block;
font-size: var(--text-xl);
margin-bottom: 0.5rem;
color: var(--app-color);
}
.app-search-empty-state p {
margin: 0 0 0.25rem;
}
.app-search-empty-state small {
display: block;
}
ul.app-search-results {
padding: 0;
margin: 0;
}
ul.app-search-results > li > a {
justify-content: space-between;
}
ul.app-search-results .badge {
font-size: 10px; /* icon-font metric — intentional px */
padding: 1px;
min-width: 18px;
text-align: center;
border-radius: 999px;
background: var(--app-accordion-border-color);
display: inline-flex;
justify-content: center;
align-items: center;
height: 18px;
position: relative;
top: -1px;
}
ul.app-search-preview {
position: relative;
font-size: var(--text-xs);
padding: 0 0 0 0;
margin: 0;
opacity: 0.75;
list-style: none;
}
/* Hide preview rows (detail results) */
.search-details-hidden ul.app-search-preview {
display: none;
}
ul.app-search-preview li {
position: relative;
padding: 0;
}
ul.app-search-preview li::before {
content: "";
position: absolute;
left: 17px;
bottom: 11px;
width: 8px;
height: 10px;
background: transparent;
border-left: 1px solid var(--app-border);
border-bottom: 1px solid var(--app-border);
border-bottom-left-radius: 6px;
}
ul.app-search-preview a {
padding-inline: 30px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: block;
border: none;
}
ul.app-search-preview a:hover {
border: none;
}
input#side-search {
--app-form-element-spacing-horizontal: 10px;
--app-form-element-spacing-vertical: 6px;
height: auto;
font-size: var(--text-sm);
padding-right: 3rem;
margin-bottom:0;
}
ul.app-search-preview:has(li) {
margin-bottom: 1rem!important;
}
.search-result-row {
display: flex;
gap: 12px;
align-items: flex-start;
}
.search-result-title-container {
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
}
.search-result-avatar,
.search-result-avatar-placeholder {
width: 40px;
height: 40px;
border-radius: 10px;
border: 1px solid var(--app-border);
background: var(--app-card-background-color);
display: inline-flex;
align-items: center;
justify-content: center;
color: var(--app-muted-color);
flex-shrink: 0;
object-fit: cover;
}
.search-result-title {
font-weight: var(--font-semibold);
text-decoration: none;
}
.search-result-desc {
margin: 0;
color: var(--app-muted-color);
font-size: var(--text-sm);
}
.search-result-type {
color: var(--app-muted-color);
font-weight: var(--font-semibold);
}
}