naiv-qr/popup/popup.css
Ole-Morten Duesund 8fa1809d9d Initial commit: Share-as-QR Firefox extension with bun build
MV3 WebExtension that turns the active tab's URL into a scannable QR
code via a toolbar popup. The popup runs locally — no network requests.

Build pipeline: `bun build` bundles popup.js + the vendored
kazuhikoarase/qrcode-generator (MIT, pinned to 83b7e8f) into a single
~23 KB minified ESM file under dist/. web-ext operates on dist/, so
the packaged zip contains only what actually ships (~28 KB).

Scripts:
- bun run build    — bundle + copy assets into dist/
- bun run lint     — build + web-ext lint (0 errors / 0 warnings)
- bun run package  — build + produce a signable .zip
- bun run start    — build + launch Firefox with the extension loaded

Tracks dogcat epic firefox-share-as-qr-35mw and its 5 child tasks
(scaffold, vendor lib, popup UI, icons, README).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 16:04:22 +02:00

98 lines
1.5 KiB
CSS

:root {
color-scheme: light dark;
--bg: #ffffff;
--fg: #1f2937;
--muted: #6b7280;
--accent: #2563eb;
--accent-fg: #ffffff;
--border: #e5e7eb;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #111827;
--fg: #f9fafb;
--muted: #9ca3af;
--accent: #3b82f6;
--accent-fg: #ffffff;
--border: #374151;
}
}
html, body {
margin: 0;
padding: 0;
background: var(--bg);
color: var(--fg);
font: 13px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
}
main {
width: 320px;
padding: 16px;
display: flex;
flex-direction: column;
align-items: center;
gap: 12px;
}
.qr {
width: 288px;
height: 288px;
display: flex;
align-items: center;
justify-content: center;
background: #ffffff;
border: 1px solid var(--border);
border-radius: 8px;
padding: 8px;
box-sizing: border-box;
}
.qr svg {
width: 100%;
height: 100%;
display: block;
}
.qr[data-empty="true"] {
background: var(--bg);
}
.message {
margin: 0;
color: var(--muted);
text-align: center;
}
.url {
margin: 0;
width: 100%;
font-size: 12px;
color: var(--muted);
overflow-wrap: anywhere;
word-break: break-all;
text-align: center;
max-height: 3.6em;
overflow-y: auto;
}
button {
font: inherit;
padding: 8px 14px;
border-radius: 6px;
border: 1px solid var(--accent);
background: var(--accent);
color: var(--accent-fg);
cursor: pointer;
}
button:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
button:disabled {
opacity: 0.5;
cursor: default;
}