mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-11 21:57:14 +03:00
Refactors the extension for on-demand injection (no static content_scripts entry — content script and detector are loaded only when the user actively opens the Impeccable panel, sidebar pane, or popup). Adds a new "Auto-scan" preference (default: scan when the Impeccable panel opens, opt-in: scan when DevTools opens) plus configurable line length (strict/lax) and highlight blur on/off settings. Adds an Elements panel sidebar that shows findings for the currently selected element. Includes substantial overlay UX work: page-pixel-perfect spotlight mask via clip-path, refined hover/dim states, instant transitions for snappier feel, copy buttons for findings, hover-from-panel highlighting, and a brand-aware exception list so the font check no longer flags Roboto on Google's own properties. Robustness fixes for the MV3 service worker lifecycle: heartbeat keepalive plus auto-reconnecting ports across panel/sidebar/devtools so transient SW restarts don't break the panel UI, and immediate teardown on DevTools close (replacing an unreliable setTimeout-based defer that didn't survive SW termination). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
98 lines
1.6 KiB
CSS
98 lines
1.6 KiB
CSS
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
:root {
|
|
--bg: #fff;
|
|
--text: #1a1a1a;
|
|
--text-dim: #666;
|
|
--text-faint: #999;
|
|
--accent: oklch(48% 0.25 350);
|
|
--rule: #e8e6e2;
|
|
}
|
|
|
|
.theme-dark {
|
|
--bg: #1a1a1a;
|
|
--text: #f5f3ef;
|
|
--text-dim: #9a9590;
|
|
--text-faint: #666;
|
|
--accent: oklch(60% 0.25 350);
|
|
--rule: #2a2a2a;
|
|
}
|
|
|
|
body {
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
|
|
font-size: 12px;
|
|
line-height: 1.5;
|
|
padding: 12px 14px;
|
|
}
|
|
|
|
/* Empty / no-findings states */
|
|
|
|
.state {
|
|
color: var(--text-faint);
|
|
font-size: 12px;
|
|
font-style: italic;
|
|
padding: 4px 0;
|
|
}
|
|
|
|
.state strong {
|
|
color: var(--text-dim);
|
|
font-style: normal;
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* Finding list */
|
|
|
|
.finding + .finding {
|
|
margin-top: 14px;
|
|
padding-top: 14px;
|
|
border-top: 1px solid var(--rule);
|
|
}
|
|
|
|
.finding-header {
|
|
display: flex;
|
|
align-items: baseline;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
.finding-name {
|
|
font-weight: 600;
|
|
font-size: 12px;
|
|
color: var(--text);
|
|
letter-spacing: -0.005em;
|
|
}
|
|
|
|
.finding-name .marker {
|
|
color: var(--accent);
|
|
margin-right: 4px;
|
|
}
|
|
|
|
.finding-kind {
|
|
font-size: 9px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.08em;
|
|
color: var(--text-faint);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.finding-detail {
|
|
font-family: ui-monospace, 'SF Mono', 'Cascadia Code', monospace;
|
|
font-size: 11px;
|
|
color: var(--text-dim);
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
.finding-description {
|
|
font-size: 11px;
|
|
color: var(--text-dim);
|
|
line-height: 1.55;
|
|
}
|