// ───────────────────────────────────────────────────────────────────────────── // Component: Blame viewer (.blm-* prefix) // File: src/scss/components/_blame.scss // // Visual rules only — colors, typography, borders, animations. // Structural layout lives in pages/_blame.scss. // ───────────────────────────────────────────────────────────────────────────── // ── Page header ─────────────────────────────────────────────────────────────── .blm-page-header { display: flex; align-items: flex-start; gap: var(--space-4); padding: var(--space-4) 0 var(--space-3); } .blm-header-left { display: flex; align-items: flex-start; gap: var(--space-3); flex: 1; min-width: 0; } .blm-path-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: var(--bg-elevated); border: 1px solid var(--border-default); border-radius: var(--radius-base); flex-shrink: 0; color: var(--color-accent); } .blm-path-info { flex: 1; min-width: 0; } .blm-filename { margin: 0 0 4px; display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; code { font-family: var(--font-mono); font-size: 16px; font-weight: 600; color: var(--text-primary); background: none; } } .blm-type-badge { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; border-radius: var(--radius-sm); border: 1px solid; padding: 2px 7px; white-space: nowrap; &--symbol { color: var(--color-accent); border-color: color-mix(in srgb, var(--color-accent) 35%, transparent); background: color-mix(in srgb, var(--color-accent) 8%, transparent); } &--file { color: var(--text-muted); border-color: var(--border-default); background: var(--bg-elevated); } } .blm-breadcrumb { margin: 0; font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; code { font-family: var(--font-mono); font-size: 11px; color: var(--color-accent-link); background: var(--bg-elevated); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 1px 6px; } } .blm-breadcrumb-link { color: var(--color-accent-link); text-decoration: none; &:hover { text-decoration: underline; } } // ── Stats strip ─────────────────────────────────────────────────────────────── .blm-stats { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) 0 var(--space-3); flex-wrap: wrap; } .blm-stat { display: flex; align-items: center; gap: 5px; padding: 4px 10px; background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-full); font-size: 12px; color: var(--text-muted); } .blm-stat-val { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-secondary); } .blm-stat--hotspot { &.blm-stat--active { border-color: color-mix(in srgb, var(--color-orange) 40%, transparent); .blm-stat-val { color: var(--color-orange); } } } .blm-stat--dead { &.blm-stat--active { border-color: color-mix(in srgb, var(--color-accent-link) 40%, transparent); .blm-stat-val { color: var(--color-accent-link); } } } .blm-stat--blast { &.blm-stat--active { border-color: color-mix(in srgb, var(--color-warning) 40%, transparent); .blm-stat-val { color: var(--color-warning); } } } // ── Empty state ─────────────────────────────────────────────────────────────── .blm-empty { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); padding: var(--space-12) var(--space-6); text-align: center; color: var(--text-muted); font-size: 14px; p { margin: 0; } code { font-family: var(--font-mono); font-size: 12px; color: var(--color-accent-link); background: var(--bg-elevated); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 1px 6px; } } .blm-empty-hint { font-size: 12px; color: var(--text-disabled); } // ── Commit legend ───────────────────────────────────────────────────────────── .blm-legend { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-base); overflow: hidden; } .blm-legend-hdr { padding: 8px 12px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); background: var(--bg-elevated); border-bottom: 1px solid var(--border-default); display: flex; align-items: center; justify-content: space-between; } .blm-legend-prov-key { font-weight: 400; letter-spacing: 0; text-transform: none; display: flex; align-items: center; gap: 6px; font-size: 10px; } .blm-commit-card { display: flex; align-items: flex-start; gap: 9px; padding: 9px 12px; border-bottom: 1px solid var(--border-subtle); text-decoration: none; transition: background var(--transition-fast); cursor: pointer; &:last-child { border-bottom: none; } &:hover { background: var(--bg-hover); } } .blm-commit-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 3px; } .blm-commit-body { flex: 1; min-width: 0; } .blm-commit-top { display: flex; align-items: center; gap: 5px; margin-bottom: 2px; } .blm-commit-sha { font-family: var(--font-mono); font-size: 11px; color: var(--color-accent-link); background: var(--bg-overlay); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 1px 5px; text-decoration: none; flex-shrink: 0; } .blm-commit-prov { width: 14px; height: 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; &--agent { background: color-mix(in srgb, var(--agent-accent) 12%, transparent); color: var(--agent-accent); } &--human { background: color-mix(in srgb, var(--color-success) 12%, transparent); color: var(--color-success); } } .blm-commit-count { font-size: 10px; color: var(--text-muted); background: var(--bg-overlay); border-radius: var(--radius-full); padding: 1px 5px; margin-left: auto; flex-shrink: 0; } .blm-commit-msg { font-size: 11px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; } .blm-commit-meta { font-size: 10px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; } .blm-commit-model { font-size: 9px; font-weight: 600; color: var(--agent-accent); background: color-mix(in srgb, var(--agent-accent) 10%, transparent); border-radius: var(--radius-full); padding: 0 4px; } // ── Symbol cards ────────────────────────────────────────────────────────────── .blm-symbol-list { display: flex; flex-direction: column; gap: var(--space-2); } .blm-card { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-base); border-left: 3px solid var(--card-color, var(--color-accent)); overflow: hidden; transition: border-color var(--transition-fast), box-shadow var(--transition-fast); &:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.3); } &[open] { border-left-width: 4px; } } .blm-card-summary { display: flex; align-items: center; gap: var(--space-3); padding: 10px 12px; cursor: pointer; list-style: none; user-select: none; &::-webkit-details-marker { display: none; } &:hover { background: var(--bg-hover); } } .blm-card-main { flex: 1; min-width: 0; } .blm-card-top { display: flex; align-items: center; gap: var(--space-2); margin-bottom: 5px; flex-wrap: wrap; } .blm-symbol-name { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--text-primary); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .blm-symbol-link { color: inherit; text-decoration: none; &:hover { color: var(--color-accent-link); } } .blm-op { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; border-radius: var(--radius-sm); border: 1px solid; padding: 1px 6px; flex-shrink: 0; &--add { color: var(--color-success); border-color: color-mix(in srgb, var(--color-success) 35%, transparent); background: color-mix(in srgb, var(--color-success) 8%, transparent); } &--modify, &--replace { color: var(--color-accent-link); border-color: color-mix(in srgb, var(--color-accent-link) 35%, transparent); background: color-mix(in srgb, var(--color-accent-link) 8%, transparent); } &--delete, &--remove { color: var(--color-danger); border-color: color-mix(in srgb, var(--color-danger) 35%, transparent); background: color-mix(in srgb, var(--color-danger) 8%, transparent); } &--rename { color: var(--color-warning); border-color: color-mix(in srgb, var(--color-warning) 35%, transparent); background: color-mix(in srgb, var(--color-warning) 10%, transparent); } &--patch { color: var(--text-muted); border-color: var(--border-subtle); background: var(--bg-overlay); } } .blm-signal { font-size: 10px; font-weight: 600; border-radius: var(--radius-full); border: 1px solid; padding: 1px 7px; display: flex; align-items: center; gap: 3px; flex-shrink: 0; &--hotspot { color: var(--color-orange); border-color: color-mix(in srgb, var(--color-orange) 40%, transparent); background: color-mix(in srgb, var(--color-orange) 8%, transparent); } &--dead { color: var(--color-accent-link); border-color: color-mix(in srgb, var(--color-accent-link) 30%, transparent); background: color-mix(in srgb, var(--color-accent-link) 6%, transparent); } &--blast { color: var(--color-warning); border-color: color-mix(in srgb, var(--color-warning) 40%, transparent); background: color-mix(in srgb, var(--color-warning) 8%, transparent); } } .blm-card-bottom { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; } .blm-heat { display: flex; align-items: center; gap: 6px; flex-shrink: 0; } .blm-heat-bar { width: 60px; height: 4px; background: var(--bg-overlay); border-radius: var(--radius-full); overflow: hidden; flex-shrink: 0; } .blm-heat-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--color-accent), var(--color-orange)); border-radius: var(--radius-full); min-width: 2px; } .blm-heat-count { font-size: 10px; color: var(--text-muted); font-variant-numeric: tabular-nums; flex-shrink: 0; } .blm-card-author { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-muted); flex: 1; min-width: 0; } .blm-author-icon { width: 14px; height: 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 9px; &--agent { background: color-mix(in srgb, var(--agent-accent) 15%, transparent); color: var(--agent-accent); } &--human { background: color-mix(in srgb, var(--color-success) 15%, transparent); color: var(--color-success); } } .blm-card-dot { color: var(--text-disabled); } .blm-card-time { color: var(--text-muted); font-size: 11px; } .blm-card-commit { font-family: var(--font-mono); font-size: 10px; color: var(--color-accent-link); text-decoration: none; background: var(--bg-overlay); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 1px 5px; margin-left: auto; flex-shrink: 0; &:hover { border-color: var(--color-accent); } } .blm-expand-chevron { color: var(--text-muted); transition: transform var(--transition-fast); flex-shrink: 0; details[open] > summary & { transform: rotate(180deg); } } // ── Symbol history panel ────────────────────────────────────────────────────── .blm-history-panel { border-top: 1px solid var(--border-subtle); background: var(--bg-elevated); } .blm-history-table { width: 100%; border-collapse: collapse; font-size: 11px; th { padding: 6px 10px; text-align: left; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); background: var(--bg-overlay); border-bottom: 1px solid var(--border-subtle); } td { padding: 5px 10px; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; color: var(--text-secondary); } tr:last-child td { border-bottom: none; } tr:hover td { background: var(--bg-hover); } } .blm-hist-num { color: var(--text-disabled); font-size: 10px; width: 28px; text-align: right; } .blm-hist-sha a { font-family: var(--font-mono); font-size: 11px; color: var(--color-accent-link); text-decoration: none; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 1px 5px; &:hover { border-color: var(--color-accent); } } .blm-hist-msg { color: var(--text-secondary); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .blm-hist-author { color: var(--text-muted); display: flex; align-items: center; gap: 4px; } .blm-hist-age { color: var(--text-muted); font-size: 10px; white-space: nowrap; } .blm-history-footer { padding: 6px 10px; border-top: 1px solid var(--border-subtle); a { font-size: 11px; color: var(--color-accent-link); text-decoration: none; &:hover { text-decoration: underline; } } } .blm-history-empty { padding: var(--space-3) var(--space-3); font-size: 11px; color: var(--text-muted); font-style: italic; margin: 0; } // ── File blame view ─────────────────────────────────────────────────────────── .blm-file-view { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-base); overflow: hidden; } .blm-file-commit-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--bg-elevated); border-bottom: 1px solid var(--border-default); flex-wrap: wrap; font-size: 12px; } .blm-file-commit-sha { font-family: var(--font-mono); font-size: 11px; color: var(--color-accent-link); text-decoration: none; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 1px 6px; flex-shrink: 0; &:hover { border-color: var(--color-accent); } } .blm-file-commit-msg { color: var(--text-secondary); font-size: 12px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .blm-file-commit-sep { color: var(--text-disabled); } .blm-file-commit-author { color: var(--text-muted); font-size: 11px; flex-shrink: 0; } .blm-file-commit-time { color: var(--text-muted); font-size: 11px; flex-shrink: 0; } .blm-file-empty { padding: var(--space-6); text-align: center; color: var(--text-muted); font-size: 13px; } // ── Code table (file blame) ─────────────────────────────────────────────────── .blm-code-table { width: 100%; border-collapse: collapse; border-spacing: 0; font-family: var(--font-mono); font-size: 12px; tab-size: 4; } .blm-code-row { scroll-margin-top: calc(var(--sticky-offset, 80px) + 16px); &:target .blm-code-cell, &:hover .blm-code-cell { background: var(--bg-hover); } &:target .blm-gutter { background: color-mix(in srgb, var(--color-accent) 8%, transparent); } } .blm-gutter { width: 1%; white-space: nowrap; vertical-align: top; padding: 0 10px 0 0; text-align: right; user-select: none; border-right: 1px solid var(--border-subtle); // border-left applied via inline style (commit color stripe) } .blm-lnlink { color: var(--text-disabled); text-decoration: none; font-size: 11px; display: block; padding: 1px 0; &:hover { color: var(--color-accent-link); } } .blm-code-cell { padding: 0 16px 0 12px; white-space: pre; width: 100%; color: var(--text-primary); line-height: 1.65; } .blm-code-truncated { padding: var(--space-3) var(--space-4); font-size: 11px; color: var(--text-muted); background: var(--bg-elevated); border-top: 1px solid var(--border-subtle); font-style: italic; } // ── Authorship key ──────────────────────────────────────────────────────────── .blm-prov-key { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--text-muted); }