theseus/bundled-addons/screenshot/editor.css

91 lines
5.1 KiB
CSS
Raw Normal View History

/* Screenshot editor full-tab page. Matches the Theseus dark aesthetic
from the sidebar. Light-mode swap is symmetric. */
:root { color-scheme: light dark;
--bg:#0e131c; --panel:#141a24; --panel2:#191f2b; --line:rgba(255,255,255,.09);
--ink:#e7eaf1; --mut:#8b98a9; --dim:#5e6678; --acid:#d6ff3d;
--danger:#ff5b5b; --board:#0a0d13; }
@media (prefers-color-scheme: light) {
:root { --bg:#f8faff; --panel:#ffffff; --panel2:#eff3fb; --line:rgba(0,0,0,.10);
--ink:#1a1f2b; --mut:#5c6577; --dim:#8a93a5; --acid: #0AC18E;
--board:#dde3ee; }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink);
font: 13px/1.5 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
display: flex; flex-direction: column; overflow: hidden; }
/* Toolbar ---------------------------------------------------------------- */
.toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
padding: 8px 10px; border-bottom: 1px solid var(--line);
background: var(--panel); user-select: none;
font: 12px ui-monospace, "Cascadia Code", Consolas, monospace; }
.toolbar .name { color: var(--dim); font-size: 11.5px; margin-right: 4px; overflow: hidden;
text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.toolbar .sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.toolbar .spacer { flex: 1; }
.tool { border: 1px solid var(--line); background: var(--panel2); color: var(--ink);
width: 30px; height: 30px; border-radius: 6px; cursor: pointer;
display: inline-flex; align-items: center; justify-content: center;
font: inherit; padding: 0; transition: background .1s, border-color .1s; }
.tool:hover { border-color: rgb(from var(--acid) r g b / .5); }
.tool.active { background: rgb(from var(--acid) r g b / .15); border-color: rgb(from var(--acid) r g b / .7); color: var(--acid); }
.tool:disabled { opacity: .4; cursor: default; }
.tool svg { width: 16px; height: 16px; display: block; }
.tool.wide { width: auto; padding: 0 10px; gap: 6px; }
.tool.danger { color: var(--danger); }
.tool.danger:hover { border-color: rgba(255,91,91,.5); }
.swatch { width: 22px; height: 22px; border-radius: 50%; padding: 0;
border: 2px solid var(--line); cursor: pointer; }
.swatch.active { border-color: var(--acid); outline: 1px solid rgb(from var(--acid) r g b / .35); outline-offset: 1px; }
.width { border: 1px solid var(--line); background: var(--panel2); color: var(--ink);
width: 30px; height: 30px; border-radius: 6px; cursor: pointer;
display: inline-flex; align-items: center; justify-content: center;
padding: 0; }
.width.active { border-color: rgb(from var(--acid) r g b / .7); background: rgb(from var(--acid) r g b / .15); }
.width .dot { border-radius: 50%; background: currentColor; color: var(--ink); }
.width.active .dot { color: var(--acid); }
.text-input {
position: absolute; z-index: 10;
background: rgba(20,26,36,.92); color: var(--ink); border: 1px solid var(--acid);
padding: 2px 6px; font: 15px/1.2 system-ui, sans-serif; outline: none;
border-radius: 3px; min-width: 80px;
}
/* Canvas board ----------------------------------------------------------- */
.board { flex: 1; overflow: auto; background: var(--board);
display: flex; align-items: flex-start; justify-content: center;
padding: 20px; }
.stage { position: relative; box-shadow: 0 0 0 1px var(--line), 0 8px 30px rgba(0,0,0,.35); }
.stage canvas { display: block; background: #fff; }
.stage canvas.draw { position: absolute; left: 0; top: 0; }
.stage canvas.overlay { position: absolute; left: 0; top: 0; pointer-events: none; }
/* When a drawing tool is active, put the drawing canvas above overlay */
.stage[data-tool="select"] canvas.draw { cursor: default; }
.stage[data-tool="crop"] canvas.draw { cursor: crosshair; }
.stage[data-tool="rect"] canvas.draw,
.stage[data-tool="ellipse"] canvas.draw,
.stage[data-tool="arrow"] canvas.draw,
.stage[data-tool="blur"] canvas.draw { cursor: crosshair; }
.stage[data-tool="pen"] canvas.draw { cursor: crosshair; }
.stage[data-tool="text"] canvas.draw { cursor: text; }
.hint { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
background: rgba(11,14,20,.9); border: 1px solid var(--line);
color: var(--ink); padding: 6px 10px; border-radius: 6px;
font-size: 12px; pointer-events: none; opacity: 0; transition: opacity .15s; }
.hint.on { opacity: 1; }
.toast { position: fixed; right: 16px; bottom: 16px;
background: rgb(from var(--acid) r g b / .15); color: var(--acid);
border: 1px solid rgb(from var(--acid) r g b / .5);
padding: 8px 12px; border-radius: 6px; font-size: 12.5px;
opacity: 0; transform: translateY(6px);
transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.on { opacity: 1; transform: translateY(0); }
.toast.err { color: #ffb0b0; background: rgba(255,60,60,.15); border-color: rgba(255,60,60,.5); }