mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 20:45:00 -05:00
The drawing area takes all the room the popup has: a new drawing is as wide and high as that room, instead of a fixed 800 x 500 in the middle. A handle at its bottom-right corner (bottom-left right to left) makes it larger, or smaller without cutting off a line, and the magnifier buttons zoom it, scrolling when it no longer fits. A drawing keeps its size when saved; older ones are 800 x 500. Save is above the drawing, at the end of the tools. Colors: clicking a color opens a color wheel, a brightness slider and the HTML color code; custom colors are added to the palette, kept in this browser; the eyedropper picks from the screen where the browser can (EyeDropper API) and from the drawing elsewhere. Any #rrggbb is a color, nothing else, so a color never becomes anything else in the SVG. Add Card: Drawing is in the row Search / Template / Drawing / More options, for one card, and opens the new card's drawing on the whole window, saved as an SVG attachment. New strings in every language. Low confidence: tlh, vo, la, chr, iu, kl, nah, ay, qu, gn, zgh, tig, wal, om, bo, dz, bua, sah, cv, csb, szl, hsb, rup, lld, fur, nap, scn, sc, co, ve-CC, ve-PP, wa, gv, kw, rm, ak, bm, ee, ff, lg, rn, rw, ss, ts, ve, nso, tn, st, ny, sn, nd, wo, fj, sm, to, bi, tpi, haw, pap, ks, uz-AR, ace, wa-RR, ary, yi, wuu-Hans. Thanks to xet7 !
48 lines
4.0 KiB
CSS
48 lines
4.0 KiB
CSS
/* #1178: drawing on a card. */
|
|
/* #6802: the popup is a column - tools, then the drawing area taking the room
|
|
that is left: the whole window when maximized. */
|
|
.card-drawing { min-width: min(820px, 90vw); display: flex; flex-direction: column; height: min(75vh, 720px); }
|
|
.pop-over--maximized .card-drawing { height: calc(100vh - 6.5em); }
|
|
/* An outline, not a border: the surface's box is exactly the drawing, so a
|
|
pointer position maps to it without an offset. */
|
|
.card-drawing-surface { outline: 1px solid #ccc; touch-action: none; cursor: crosshair; background: #fff; display: block; }
|
|
.card-drawing-tools, .card-drawing-list { display: flex; flex-wrap: wrap; gap: 0.4em; align-items: center; margin: 0.4em 0; }
|
|
/* Save at the end of the tools, above the drawing. */
|
|
.card-drawing-actions { display: flex; flex-wrap: wrap; gap: 0.6em; align-items: center; margin-inline-start: auto; }
|
|
.card-drawing-actions .js-drawing-save { margin: 0; }
|
|
.card-drawing-color { width: 1.4em; height: 1.4em; border-radius: 50%; border: 2px solid #999; display: inline-block; }
|
|
.card-drawing-color--custom { border-style: dashed; }
|
|
.card-drawing-color.is-active, .card-drawing-width.is-active, .card-drawing-thumb.is-active { outline: 2px solid #2b6cb0; }
|
|
.card-drawing-width { padding: 0 0.4em; border: 1px solid #ccc; border-radius: 3px; }
|
|
.card-drawing-thumb svg { width: 6em; height: auto; border: 1px solid #ddd; display: block; }
|
|
/* #6802: the eraser, and the surface while it is on. */
|
|
.card-drawing-eraser { padding: 0 0.3em; }
|
|
.card-drawing-eraser.is-active { outline: 2px solid #2b6cb0; border-radius: 3px; }
|
|
.card-drawing-surface.is-erasing { cursor: cell; }
|
|
/* #6802: the lasso, its loop, the selection and its resize handle. */
|
|
.card-drawing-lasso { padding: 0 0.3em; }
|
|
.card-drawing-lasso.is-active { outline: 2px solid #2b6cb0; border-radius: 3px; }
|
|
.card-drawing-surface.is-lasso { cursor: default; }
|
|
.card-drawing-selection-tools { display: flex; flex-wrap: wrap; gap: 0.6em; align-items: center; margin: 0.2em 0 0.4em; }
|
|
.card-drawing-lasso-loop { fill: rgba(43, 108, 176, 0.08); stroke: #2b6cb0; stroke-width: 1; stroke-dasharray: 4 3; pointer-events: none; }
|
|
.card-drawing-selection { fill: none; stroke: #2b6cb0; stroke-width: 1; stroke-dasharray: 5 3; cursor: move; pointer-events: none; }
|
|
.card-drawing-resize-handle { fill: #ffffff; stroke: #2b6cb0; stroke-width: 2; cursor: nwse-resize; }
|
|
/* #6802: colors - the custom-color button, the eyedropper, the wheel. */
|
|
.card-drawing-add-custom, .card-drawing-eyedropper { padding: 0 0.3em; }
|
|
.card-drawing-eyedropper.is-active { outline: 2px solid #2b6cb0; border-radius: 3px; }
|
|
.card-drawing-surface.is-picking { cursor: copy; }
|
|
.card-drawing-color-editor { display: flex; flex-wrap: wrap; gap: 1em; align-items: center; margin: 0.2em 0 0.4em; }
|
|
.card-drawing-wheel { width: 160px; height: 160px; border-radius: 50%; touch-action: none; cursor: crosshair; }
|
|
.card-drawing-color-fields { display: flex; flex-direction: column; gap: 0.4em; align-items: flex-start; }
|
|
.card-drawing-color-fields label { display: flex; flex-direction: column; gap: 0.2em; }
|
|
.card-drawing-color-fields .js-drawing-hex { width: 7em; font-family: monospace; }
|
|
.card-drawing-color-preview { width: 3em; height: 1.4em; border: 1px solid #999; border-radius: 3px; display: inline-block; }
|
|
/* #6802: the drawing area - it scrolls when zoomed past the room it has, and
|
|
grows from the handle at its bottom-right corner. */
|
|
.card-drawing-zoom { min-width: 3em; text-align: center; }
|
|
.card-drawing-stage { flex: 1 1 auto; min-height: 0; overflow: auto; position: relative; padding-inline-end: 10px; padding-block-end: 10px; box-sizing: border-box; }
|
|
.card-drawing-canvas { position: relative; }
|
|
/* At the inline end: bottom-right, or bottom-left in a right-to-left language. */
|
|
.card-drawing-canvas-resize { position: absolute; inset-inline-end: -6px; bottom: -6px; width: 14px; height: 14px; background: #fff; border: 2px solid #2b6cb0; border-radius: 2px; cursor: nwse-resize; touch-action: none; }
|
|
.card-drawing-canvas-resize:focus-visible { outline: 2px solid #2b6cb0; outline-offset: 2px; }
|