@scrawl-board/board 0.1.0-beta.0 → 0.1.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +8 -0
- package/README.md +11 -5
- package/dist/Inter-OFL.txt +92 -0
- package/dist/browser.d.ts +1314 -29
- package/dist/browser.js +11407 -36607
- package/dist/core.d.ts +1455 -61
- package/dist/core.js +3003 -85
- package/dist/index.d.ts +2109 -78
- package/dist/index.js +14291 -37063
- package/dist/local.d.ts +518 -0
- package/dist/local.js +342 -0
- package/dist/react.d.ts +1444 -34
- package/dist/react.js +13757 -36879
- package/dist/styles.css +619 -58
- package/package.json +17 -3
package/dist/styles.css
CHANGED
|
@@ -6,7 +6,11 @@
|
|
|
6
6
|
--scrawl-color-text: #1c1c1a;
|
|
7
7
|
--scrawl-color-text-muted: #62625c;
|
|
8
8
|
--scrawl-color-edge: #d4d4cc;
|
|
9
|
-
|
|
9
|
+
/* Light outline for floating chrome — the edge colour, softened toward the
|
|
10
|
+
surface so panels read as separate without heavy lines. */
|
|
11
|
+
--scrawl-color-chrome-border: color-mix(in srgb, var(--scrawl-color-edge) 60%, var(--scrawl-color-surface));
|
|
12
|
+
--scrawl-color-focus: #2563eb;
|
|
13
|
+
--scrawl-color-primary: #1856a3;
|
|
10
14
|
--scrawl-color-selection: #d9e8f7;
|
|
11
15
|
--scrawl-color-danger: #a3302b;
|
|
12
16
|
--scrawl-color-warning: #805400;
|
|
@@ -18,9 +22,9 @@
|
|
|
18
22
|
--scrawl-font-weight-strong: 650;
|
|
19
23
|
--scrawl-radius-control: 6px;
|
|
20
24
|
--scrawl-radius-panel: 10px;
|
|
21
|
-
--scrawl-elevation-low:
|
|
22
|
-
--scrawl-elevation-high:
|
|
23
|
-
--scrawl-motion-duration:
|
|
25
|
+
--scrawl-elevation-low: none;
|
|
26
|
+
--scrawl-elevation-high: none;
|
|
27
|
+
--scrawl-motion-duration: 0ms;
|
|
24
28
|
--scrawl-motion-easing: cubic-bezier(0.2, 0, 0, 1);
|
|
25
29
|
--scrawl-density: comfortable;
|
|
26
30
|
box-sizing: border-box;
|
|
@@ -56,8 +60,9 @@
|
|
|
56
60
|
[data-scrawl-portal] button, [data-scrawl-portal] [role="button"] { min-block-size: 44px; min-inline-size: 44px; }
|
|
57
61
|
|
|
58
62
|
[data-scrawl-root] :focus-visible, [data-scrawl-portal] :focus-visible {
|
|
59
|
-
outline:
|
|
60
|
-
|
|
63
|
+
outline: none;
|
|
64
|
+
background-color: var(--scrawl-color-selection);
|
|
65
|
+
outline-offset: 0;
|
|
61
66
|
}
|
|
62
67
|
|
|
63
68
|
[data-scrawl-root] [data-scrawl-canvas], [data-scrawl-root] .scrawl-board__content {
|
|
@@ -102,10 +107,12 @@
|
|
|
102
107
|
[data-scrawl-root] .scrawl-board__actions,
|
|
103
108
|
[data-scrawl-root] .scrawl-board__tools,
|
|
104
109
|
[data-scrawl-root] .scrawl-board__view,
|
|
110
|
+
[data-scrawl-root] .scrawl-board__ink-bar,
|
|
111
|
+
[data-scrawl-root] .scrawl-board__more-tools,
|
|
105
112
|
[data-scrawl-root] .scrawl-board__style-shelf {
|
|
106
113
|
align-items: center;
|
|
107
|
-
background: var(--scrawl-color-surface
|
|
108
|
-
border:
|
|
114
|
+
background: var(--scrawl-color-surface);
|
|
115
|
+
border: 0;
|
|
109
116
|
border-radius: var(--scrawl-radius-panel);
|
|
110
117
|
display: flex;
|
|
111
118
|
gap: 2px;
|
|
@@ -115,20 +122,112 @@
|
|
|
115
122
|
}
|
|
116
123
|
|
|
117
124
|
[data-scrawl-root] .scrawl-board__actions { inset-block-start: 12px; inset-inline-end: 12px; }
|
|
118
|
-
[data-scrawl-root] .scrawl-board__tools {
|
|
125
|
+
[data-scrawl-root] .scrawl-board__tools {
|
|
126
|
+
inset-block-start: 50%;
|
|
127
|
+
inset-inline-start: 12px;
|
|
128
|
+
inline-size: 54px;
|
|
129
|
+
max-block-size: calc(100% - 144px);
|
|
130
|
+
overflow-y: auto;
|
|
131
|
+
flex-direction: column;
|
|
132
|
+
transform: translateY(-50%);
|
|
133
|
+
box-shadow: var(--scrawl-elevation-low);
|
|
134
|
+
}
|
|
135
|
+
[data-scrawl-root] .scrawl-board__tools > button { flex: 0 0 44px; inline-size: 44px; }
|
|
136
|
+
[data-scrawl-root] .scrawl-board__tools button,
|
|
137
|
+
[data-scrawl-root] .scrawl-board__more-tools button { display: flex; align-items: center; justify-content: center; }
|
|
138
|
+
[data-scrawl-root] .scrawl-board__tools svg,
|
|
139
|
+
[data-scrawl-root] .scrawl-board__more-tools svg { display: block; inline-size: 22px; block-size: 22px; }
|
|
140
|
+
[data-scrawl-root] .scrawl-board__tools .scrawl-board__ink-sample { margin: 0; }
|
|
141
|
+
[data-scrawl-root] .scrawl-board__tools :focus-visible,
|
|
142
|
+
[data-scrawl-root] .scrawl-board__more-tools :focus-visible,
|
|
143
|
+
[data-scrawl-root] .scrawl-board__style-shelf :focus-visible { outline-offset: -3px; }
|
|
119
144
|
[data-scrawl-root] .scrawl-board__view { inset-block-end: 12px; inset-inline-end: 12px; }
|
|
120
|
-
[data-scrawl-root] .scrawl-
|
|
121
|
-
|
|
122
|
-
inset-block-end: 68px;
|
|
145
|
+
[data-scrawl-root] .scrawl-board__ink-bar {
|
|
146
|
+
inset-block-end: 12px;
|
|
123
147
|
inset-inline-start: 50%;
|
|
124
|
-
max-inline-size: calc(100% - 24px);
|
|
125
|
-
overflow-x: auto;
|
|
126
148
|
transform: translateX(-50%);
|
|
149
|
+
box-shadow: var(--scrawl-elevation-low);
|
|
150
|
+
}
|
|
151
|
+
[data-scrawl-root] .scrawl-board__more-tools,
|
|
152
|
+
[data-scrawl-root] .scrawl-board__style-shelf {
|
|
153
|
+
inset-inline-start: 78px;
|
|
154
|
+
inset-block-start: 72px;
|
|
155
|
+
inline-size: 106px;
|
|
156
|
+
max-block-size: calc(100% - 84px);
|
|
157
|
+
overflow-y: auto;
|
|
158
|
+
box-shadow: var(--scrawl-elevation-low);
|
|
159
|
+
}
|
|
160
|
+
[data-scrawl-root] .scrawl-board__more-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
|
|
161
|
+
[data-scrawl-root] .scrawl-board__style-shelf .scrawl-board__style-group {
|
|
162
|
+
display: grid;
|
|
163
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
164
|
+
gap: 4px;
|
|
165
|
+
inline-size: 100%;
|
|
166
|
+
white-space: normal;
|
|
127
167
|
}
|
|
168
|
+
[data-scrawl-root] .scrawl-board__style-shelf .scrawl-board__style-group > span { grid-column: 1 / -1; text-align: center; }
|
|
169
|
+
[data-scrawl-root] .scrawl-board__style-shelf .scrawl-board__style-group button { padding: 4px; font-size: 12px; }
|
|
128
170
|
[data-scrawl-root] .scrawl-board__style-group { align-items: center; display: flex; gap: 6px; white-space: nowrap; }
|
|
129
171
|
[data-scrawl-root] .scrawl-board__style-group > span:first-child { color: var(--scrawl-color-text-muted); font-size: 0.75rem; font-weight: var(--scrawl-font-weight-strong); text-transform: uppercase; }
|
|
130
172
|
[data-scrawl-root] .scrawl-board__style-group button { align-items: center; display: flex; justify-content: center; padding: 6px 10px; }
|
|
131
|
-
[data-scrawl-root] .scrawl-board__style-group button span[aria-hidden] { block-size:
|
|
173
|
+
[data-scrawl-root] .scrawl-board__style-group button span[aria-hidden] { block-size: 22px; border-radius: 2px; inline-size: 26px; }
|
|
174
|
+
/* Eraser sizes preview the (round) brush itself, not a colour. */
|
|
175
|
+
[data-scrawl-root] .scrawl-board__style-group[aria-label="Eraser size"] button span[aria-hidden] { border-radius: 50%; }
|
|
176
|
+
|
|
177
|
+
/*
|
|
178
|
+
* Fixed, not absolute: `screenPosition` (BoardSnapshot.focusedItem) is
|
|
179
|
+
* computed from the canvas's own getBoundingClientRect, i.e. viewport
|
|
180
|
+
* coordinates — matching `position: fixed` is what keeps this toolbar
|
|
181
|
+
* glued to the focused object regardless of where [data-scrawl-root] sits
|
|
182
|
+
* on the page, the same contract every other consumer of `boardToScreen`
|
|
183
|
+
* already relies on.
|
|
184
|
+
*/
|
|
185
|
+
[data-scrawl-root] .scrawl-board__focus-toolbar {
|
|
186
|
+
align-items: center;
|
|
187
|
+
background: var(--scrawl-color-surface-raised);
|
|
188
|
+
border: 0;
|
|
189
|
+
border-radius: var(--scrawl-radius-panel);
|
|
190
|
+
box-shadow: var(--scrawl-elevation-low);
|
|
191
|
+
display: flex;
|
|
192
|
+
gap: 4px;
|
|
193
|
+
max-inline-size: calc(100vw - 24px);
|
|
194
|
+
overflow: visible;
|
|
195
|
+
padding: 4px;
|
|
196
|
+
pointer-events: auto;
|
|
197
|
+
position: fixed;
|
|
198
|
+
transform: none;
|
|
199
|
+
z-index: 15;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/* Notes have no gizmo of their own (it's ink-stroke/shape-only) — this is
|
|
203
|
+
that capability's default-ui-owned equivalent, visually matching the
|
|
204
|
+
gizmo's own restyle (spaced sharp-cornered outline, circular handles,
|
|
205
|
+
GAP_PX outset) — see renderer/selection/gizmo.ts's LineLoop outline. */
|
|
206
|
+
[data-scrawl-root] .scrawl-board__focus-outline {
|
|
207
|
+
display: none;
|
|
208
|
+
border: 0;
|
|
209
|
+
border-radius: 0;
|
|
210
|
+
pointer-events: none;
|
|
211
|
+
position: fixed;
|
|
212
|
+
z-index: 12;
|
|
213
|
+
}
|
|
214
|
+
[data-scrawl-root] .scrawl-board__focus-outline[data-locked="true"] { border-color: var(--scrawl-color-warning); }
|
|
215
|
+
|
|
216
|
+
[data-scrawl-root] .scrawl-board__focus-handle {
|
|
217
|
+
background: var(--scrawl-color-focus);
|
|
218
|
+
block-size: 8px;
|
|
219
|
+
border: 0;
|
|
220
|
+
border-radius: 50%;
|
|
221
|
+
box-shadow: var(--scrawl-elevation-low);
|
|
222
|
+
inline-size: 8px;
|
|
223
|
+
pointer-events: auto;
|
|
224
|
+
position: fixed;
|
|
225
|
+
touch-action: none;
|
|
226
|
+
transform: translate(-50%, -50%);
|
|
227
|
+
z-index: 16;
|
|
228
|
+
}
|
|
229
|
+
[data-scrawl-root] .scrawl-board__focus-handle[data-orientation="nwse"] { cursor: nwse-resize; }
|
|
230
|
+
[data-scrawl-root] .scrawl-board__focus-handle[data-orientation="nesw"] { cursor: nesw-resize; }
|
|
132
231
|
|
|
133
232
|
[data-scrawl-root] [data-scrawl-default-ui] button,
|
|
134
233
|
[data-scrawl-root] [data-scrawl-default-ui] select,
|
|
@@ -151,44 +250,22 @@
|
|
|
151
250
|
|
|
152
251
|
[data-scrawl-root] [data-scrawl-default-ui] button[aria-pressed="true"],
|
|
153
252
|
[data-scrawl-portal] .scrawl-board__panel button[aria-pressed="true"] {
|
|
154
|
-
background: var(--scrawl-color-
|
|
253
|
+
background: color-mix(in srgb, var(--scrawl-color-primary), var(--scrawl-color-surface) 82%);
|
|
254
|
+
color: var(--scrawl-color-primary);
|
|
155
255
|
font-weight: var(--scrawl-font-weight-strong);
|
|
156
256
|
}
|
|
157
257
|
|
|
158
258
|
[data-scrawl-root] [data-scrawl-default-ui] button:disabled,
|
|
159
259
|
[data-scrawl-root] [data-scrawl-default-ui] select:disabled { color: var(--scrawl-color-text-muted); cursor: not-allowed; }
|
|
160
260
|
|
|
161
|
-
|
|
162
|
-
align-items: center;
|
|
163
|
-
display: flex;
|
|
164
|
-
min-block-size: 44px;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
[data-scrawl-root] .scrawl-board__tool-select > span { block-size: 1px; clip: rect(0, 0, 0, 0); inline-size: 1px; overflow: hidden; position: absolute; }
|
|
168
|
-
[data-scrawl-root] .scrawl-board__tool-select select {
|
|
169
|
-
-webkit-appearance: none;
|
|
170
|
-
appearance: none;
|
|
171
|
-
/* Chevron drawn from two gradient triangles rather than an embedded asset
|
|
172
|
-
reference (disallowed by this stylesheet's policy, see styles.test.ts),
|
|
173
|
-
and currentColor keeps it Theme-aware where a bitmap/SVG asset would
|
|
174
|
-
need its own colour. */
|
|
175
|
-
background-image:
|
|
176
|
-
linear-gradient(45deg, transparent 50%, currentColor 50%),
|
|
177
|
-
linear-gradient(135deg, currentColor 50%, transparent 50%);
|
|
178
|
-
background-position: right 14px center, right 9px center;
|
|
179
|
-
background-repeat: no-repeat;
|
|
180
|
-
background-size: 5px 5px, 5px 5px;
|
|
181
|
-
min-block-size: 44px;
|
|
182
|
-
padding-inline: 8px 24px;
|
|
183
|
-
}
|
|
184
|
-
|
|
261
|
+
/* Colour swatches are small rectangles, matching the sticky-note swatches. */
|
|
185
262
|
[data-scrawl-root] .scrawl-board__ink-sample,
|
|
186
263
|
[data-scrawl-portal] .scrawl-board__ink-options span {
|
|
187
|
-
border:
|
|
188
|
-
border-radius:
|
|
189
|
-
block-size:
|
|
264
|
+
border: 0;
|
|
265
|
+
border-radius: 2px;
|
|
266
|
+
block-size: 22px;
|
|
190
267
|
display: inline-block;
|
|
191
|
-
inline-size:
|
|
268
|
+
inline-size: 26px;
|
|
192
269
|
margin-inline-end: 6px;
|
|
193
270
|
vertical-align: middle;
|
|
194
271
|
}
|
|
@@ -204,7 +281,7 @@
|
|
|
204
281
|
|
|
205
282
|
[data-scrawl-portal] .scrawl-board__panel {
|
|
206
283
|
background: var(--scrawl-color-surface-raised);
|
|
207
|
-
border:
|
|
284
|
+
border: 0;
|
|
208
285
|
border-radius: var(--scrawl-radius-panel);
|
|
209
286
|
box-shadow: var(--scrawl-elevation-high);
|
|
210
287
|
color: var(--scrawl-color-text);
|
|
@@ -220,6 +297,15 @@
|
|
|
220
297
|
z-index: 1;
|
|
221
298
|
}
|
|
222
299
|
|
|
300
|
+
/* Search and Export open under their buttons in the top-right. */
|
|
301
|
+
[data-scrawl-portal] .scrawl-board__panel[data-anchor="actions"] {
|
|
302
|
+
inset-block: 72px auto;
|
|
303
|
+
inset-inline: auto 12px;
|
|
304
|
+
inline-size: min(24rem, calc(100% - 24px));
|
|
305
|
+
transform: none;
|
|
306
|
+
border: 1px solid var(--scrawl-color-chrome-border);
|
|
307
|
+
}
|
|
308
|
+
|
|
223
309
|
[data-scrawl-portal] .scrawl-board__panel-heading { align-items: center; display: flex; justify-content: space-between; margin-block-end: 10px; }
|
|
224
310
|
[data-scrawl-portal] .scrawl-board__panel-heading h2 { font-size: 1rem; line-height: 1.4; margin: 0; }
|
|
225
311
|
[data-scrawl-portal] .scrawl-board__ink-options,
|
|
@@ -228,17 +314,27 @@
|
|
|
228
314
|
[data-scrawl-portal] .scrawl-board__export-options button { text-align: start; }
|
|
229
315
|
|
|
230
316
|
[data-scrawl-portal] [data-scrawl-search] label { display: grid; font-weight: var(--scrawl-font-weight-strong); gap: 6px; }
|
|
231
|
-
[data-scrawl-portal] [data-scrawl-search] input { background: var(--scrawl-color-surface); border:
|
|
317
|
+
[data-scrawl-portal] [data-scrawl-search] input { background: var(--scrawl-color-surface); border: 0; min-block-size: 44px; padding: 8px 10px; }
|
|
232
318
|
[data-scrawl-portal] [data-scrawl-search-results] { display: grid; gap: 4px; margin-block-start: 8px; }
|
|
233
319
|
[data-scrawl-portal] [data-scrawl-search-results] button { display: grid; gap: 2px; text-align: start; }
|
|
234
320
|
[data-scrawl-portal] [data-scrawl-search-results] span { color: var(--scrawl-color-text-muted); }
|
|
235
321
|
|
|
322
|
+
/* Its own 1px border already signals "editable and focused" — the generic
|
|
323
|
+
:focus-visible ring above is meant for buttons/inputs in the surrounding
|
|
324
|
+
chrome, not this, and would otherwise double up into a border-within-a-
|
|
325
|
+
ring right on top of it. `outline: none` here (not just on :focus) is a
|
|
326
|
+
deliberate, always-on reset — including against a Host page's own global
|
|
327
|
+
`textarea`/`input` focus-ring CSS (e.g. Tailwind/shadcn's), which a plain
|
|
328
|
+
element selector can bleed onto this real DOM textarea; this class
|
|
329
|
+
selector already outranks that on specificity alone, but stating it
|
|
330
|
+
outright means the DOM inspector shows one clear winner, not a fight. */
|
|
236
331
|
[data-scrawl-portal] .scrawl-board__inline-editor {
|
|
237
332
|
background: var(--scrawl-color-surface);
|
|
238
|
-
border:
|
|
333
|
+
border: 0;
|
|
239
334
|
border-radius: var(--scrawl-radius-control);
|
|
240
335
|
box-shadow: var(--scrawl-elevation-high);
|
|
241
336
|
min-block-size: 32px;
|
|
337
|
+
outline: none;
|
|
242
338
|
padding: 6px 8px;
|
|
243
339
|
pointer-events: auto;
|
|
244
340
|
position: absolute;
|
|
@@ -248,12 +344,42 @@
|
|
|
248
344
|
z-index: 25;
|
|
249
345
|
}
|
|
250
346
|
|
|
347
|
+
/* Text blocks live directly on the canvas with no chrome of their own — the
|
|
348
|
+
editor should read as "the same text, now with a caret," not as a form
|
|
349
|
+
field dropped on top of it: no opaque surface or shadow, just a 1px frame
|
|
350
|
+
(the canvas selection gizmo is hidden while this is open, so this is the
|
|
351
|
+
only frame). Its width/height follow the text (inline-editing.tsx measures it),
|
|
352
|
+
and the canvas hides the block's own copy underneath while it's open. */
|
|
353
|
+
[data-scrawl-portal] .scrawl-board__inline-editor--text {
|
|
354
|
+
background: transparent;
|
|
355
|
+
border: 1px solid var(--scrawl-color-focus);
|
|
356
|
+
border-radius: 0;
|
|
357
|
+
box-shadow: none;
|
|
358
|
+
max-inline-size: min(60vw, 640px);
|
|
359
|
+
overflow: hidden;
|
|
360
|
+
min-block-size: 0;
|
|
361
|
+
padding: 2px 4px;
|
|
362
|
+
}
|
|
363
|
+
|
|
251
364
|
[data-scrawl-portal] .scrawl-board__inline-editor--table-cell {
|
|
252
365
|
pointer-events: auto;
|
|
253
366
|
position: absolute;
|
|
254
367
|
z-index: 25;
|
|
255
368
|
}
|
|
256
|
-
|
|
369
|
+
/* Transparent, chromeless — the table's own canvas-drawn cell highlight
|
|
370
|
+
(tables.ts's cellHighlight, the same FOCUS_COLOR as everything else) is
|
|
371
|
+
already the one border marking the active cell; an opaque bg + its own
|
|
372
|
+
border here would just double it up right on top. */
|
|
373
|
+
[data-scrawl-portal] .scrawl-board__inline-editor--table-cell .scrawl-board__inline-editor {
|
|
374
|
+
background: transparent;
|
|
375
|
+
block-size: 100%;
|
|
376
|
+
border: none;
|
|
377
|
+
border-radius: 0;
|
|
378
|
+
box-shadow: none;
|
|
379
|
+
inline-size: 100%;
|
|
380
|
+
inset: 0;
|
|
381
|
+
position: absolute;
|
|
382
|
+
}
|
|
257
383
|
|
|
258
384
|
[data-scrawl-portal] .scrawl-board__inline-editor-actions {
|
|
259
385
|
align-items: center;
|
|
@@ -262,23 +388,39 @@
|
|
|
262
388
|
box-shadow: var(--scrawl-elevation-low);
|
|
263
389
|
display: flex;
|
|
264
390
|
font-size: 0.75rem;
|
|
265
|
-
gap:
|
|
391
|
+
gap: 2px;
|
|
266
392
|
inset-block-end: calc(100% + 4px);
|
|
267
393
|
inset-inline-start: 0;
|
|
268
|
-
padding:
|
|
394
|
+
padding: 3px;
|
|
269
395
|
position: absolute;
|
|
270
396
|
white-space: nowrap;
|
|
271
397
|
}
|
|
272
|
-
[data-scrawl-portal] .scrawl-board__inline-editor-actions
|
|
398
|
+
[data-scrawl-portal] .scrawl-board__inline-editor-actions span { padding: 0 6px; color: var(--scrawl-color-text-muted); }
|
|
399
|
+
[data-scrawl-portal] .scrawl-board__inline-editor-actions button {
|
|
400
|
+
align-items: center;
|
|
401
|
+
display: flex;
|
|
402
|
+
justify-content: center;
|
|
403
|
+
min-block-size: 26px;
|
|
404
|
+
min-inline-size: 26px;
|
|
405
|
+
padding: 4px;
|
|
406
|
+
}
|
|
407
|
+
[data-scrawl-portal] .scrawl-board__inline-editor-actions svg { width: 16px; height: 16px; }
|
|
273
408
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
409
|
+
/* Opens straight up out of the ink bar it belongs to (bottom centre, only
|
|
410
|
+
while the Marker is selected) — the bar sits 12px up and is 52px tall. */
|
|
411
|
+
[data-scrawl-portal] .scrawl-board__panel[aria-label="Ink style"] {
|
|
412
|
+
inset-block-start: auto;
|
|
413
|
+
inset-block-end: 72px;
|
|
414
|
+
inset-inline-start: 50%;
|
|
415
|
+
inline-size: 156px;
|
|
416
|
+
max-block-size: calc(100% - 84px);
|
|
417
|
+
transform: translateX(-50%);
|
|
281
418
|
}
|
|
419
|
+
[data-scrawl-portal] .scrawl-board__panel[aria-label="Ink style"] .scrawl-board__panel-heading { flex-direction: column; align-items: stretch; }
|
|
420
|
+
[data-scrawl-portal] .scrawl-board__panel[data-headless] { inline-size: auto; padding: 6px; }
|
|
421
|
+
[data-scrawl-portal] .scrawl-board__ink-options { grid-template-columns: repeat(2, 1fr); }
|
|
422
|
+
[data-scrawl-portal] .scrawl-board__ink-options button { display: flex; justify-content: center; align-items: center; }
|
|
423
|
+
[data-scrawl-portal] .scrawl-board__ink-options span { margin: 0; }
|
|
282
424
|
|
|
283
425
|
[data-scrawl-root] .scrawl-board__status, [data-scrawl-portal] .scrawl-board__status {
|
|
284
426
|
block-size: 1px;
|
|
@@ -294,4 +436,423 @@
|
|
|
294
436
|
|
|
295
437
|
@media (prefers-reduced-motion: reduce) {
|
|
296
438
|
[data-scrawl-root], [data-scrawl-portal] { --scrawl-motion-duration: 0ms !important; }
|
|
439
|
+
[data-scrawl-root] [data-scrawl-default-ui] { --scrawl-sidebar-motion: 0ms !important; }
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
[data-scrawl-root] .scrawl-board__picker { position: relative; }
|
|
443
|
+
[data-scrawl-root] .scrawl-board__picker-options {
|
|
444
|
+
position: fixed;
|
|
445
|
+
display: grid;
|
|
446
|
+
grid-template-columns: repeat(2, 44px);
|
|
447
|
+
gap: 4px;
|
|
448
|
+
padding: 4px;
|
|
449
|
+
max-block-size: min(420px, 60vh);
|
|
450
|
+
overflow-y: auto;
|
|
451
|
+
background: var(--scrawl-color-surface);
|
|
452
|
+
border: 0;
|
|
453
|
+
border-radius: var(--scrawl-radius-panel);
|
|
454
|
+
box-shadow: var(--scrawl-elevation-low);
|
|
455
|
+
z-index: 1;
|
|
456
|
+
}
|
|
457
|
+
[data-scrawl-root] .scrawl-board__focus-toolbar button { display: flex; align-items: center; justify-content: center; padding: 8px; }
|
|
458
|
+
[data-scrawl-root] .scrawl-board__color-chip { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 0; border-radius: 50%; }
|
|
459
|
+
[data-scrawl-root] .scrawl-board__color-chip svg { width: 16px; height: 16px; color: var(--scrawl-color-text); background: var(--scrawl-color-surface); border-radius: 50%; }
|
|
460
|
+
[data-scrawl-root] .scrawl-board__color-chip[data-rectangular="true"],
|
|
461
|
+
[data-scrawl-root] .scrawl-board__style-group .scrawl-board__note-swatch span[aria-hidden] { border-radius: 2px; width: 26px; height: 22px; }
|
|
462
|
+
[data-scrawl-root] .scrawl-board__picker-options :focus-visible { outline-offset: -3px; }
|
|
463
|
+
|
|
464
|
+
[data-scrawl-root] .scrawl-board__welcome {
|
|
465
|
+
position: absolute;
|
|
466
|
+
inset: 80px 24px 80px 90px;
|
|
467
|
+
display: flex;
|
|
468
|
+
flex-direction: column;
|
|
469
|
+
align-items: center;
|
|
470
|
+
justify-content: center;
|
|
471
|
+
text-align: center;
|
|
472
|
+
color: var(--scrawl-color-text-muted);
|
|
473
|
+
pointer-events: none;
|
|
474
|
+
}
|
|
475
|
+
[data-scrawl-root] .scrawl-board__welcome-mark { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 20px; border-radius: 16px; background: var(--scrawl-color-text); color: var(--scrawl-color-surface); }
|
|
476
|
+
[data-scrawl-root] .scrawl-board__welcome-mark svg { width: 28px; height: 28px; }
|
|
477
|
+
[data-scrawl-root] .scrawl-board__welcome h2 { font-size: clamp(18px, 2vw, 24px); font-weight: 500; line-height: 1.3; margin: 0 0 8px; }
|
|
478
|
+
[data-scrawl-root] .scrawl-board__welcome p { margin: 0; }
|
|
479
|
+
[data-scrawl-root] .scrawl-board__welcome-shortcuts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; pointer-events: auto; }
|
|
480
|
+
[data-scrawl-root] .scrawl-board__welcome-shortcuts button { display: flex; align-items: center; gap: 8px; background: var(--scrawl-color-surface); border: 0; }
|
|
481
|
+
[data-scrawl-root] .scrawl-board__welcome kbd { font-size: 11px; padding: 2px 5px; border-radius: 4px; background: var(--scrawl-color-surface-muted); }
|
|
482
|
+
@media (max-height: 420px), (max-width: 440px) {
|
|
483
|
+
[data-scrawl-root] .scrawl-board__welcome-mark, [data-scrawl-root] .scrawl-board__welcome-shortcuts { display: none; }
|
|
484
|
+
[data-scrawl-root] .scrawl-board__welcome p { font-size: 12px; }
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
/* Empty-Board callouts pointing at chrome the welcome panel itself doesn't
|
|
488
|
+
sit near enough to explain — the tool rail and the zoom/fit controls.
|
|
489
|
+
Purely decorative (aria-hidden), so a Host hiding "tools"/"view" or
|
|
490
|
+
supplying its own toolbar slot just loses the matching callout, never a
|
|
491
|
+
dangling arrow pointing at nothing. */
|
|
492
|
+
[data-scrawl-root] .scrawl-board__welcome-hint {
|
|
493
|
+
position: absolute;
|
|
494
|
+
display: flex;
|
|
495
|
+
align-items: center;
|
|
496
|
+
gap: 6px;
|
|
497
|
+
color: var(--scrawl-color-text-muted);
|
|
498
|
+
font-size: 13px;
|
|
499
|
+
white-space: nowrap;
|
|
500
|
+
pointer-events: none;
|
|
501
|
+
z-index: 11;
|
|
502
|
+
}
|
|
503
|
+
[data-scrawl-root] .scrawl-board__welcome-hint svg { flex: none; }
|
|
504
|
+
[data-scrawl-root] .scrawl-board__welcome-hint--tools { inset-block-start: 76px; inset-inline-start: 84px; }
|
|
505
|
+
[data-scrawl-root] .scrawl-board__welcome-hint--view { inset-block-end: 84px; inset-inline-end: 96px; }
|
|
506
|
+
@media (max-height: 480px), (max-width: 640px) {
|
|
507
|
+
[data-scrawl-root] .scrawl-board__welcome-hint { display: none; }
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
[data-scrawl-root] .scrawl-board__focus-handle { border-radius: 1px; }
|
|
511
|
+
/* Top-left origin, matching the committed note texture (stickyNotes.ts's
|
|
512
|
+
renderNoteFace). Padding comes from the inline style, which scales the
|
|
513
|
+
texture's own 40/512 pad to the note's current on-screen size. */
|
|
514
|
+
[data-scrawl-portal] .scrawl-board__inline-editor--note { text-align: start; align-content: start; }
|
|
515
|
+
[data-scrawl-portal] .scrawl-board__inline-editor:focus-visible { outline: none; background-color: inherit; }
|
|
516
|
+
|
|
517
|
+
[data-scrawl-root] [data-scrawl-default-ui] button:focus-visible,
|
|
518
|
+
[data-scrawl-portal] button:focus-visible {
|
|
519
|
+
outline: none;
|
|
520
|
+
background: var(--scrawl-color-focus);
|
|
521
|
+
color: var(--scrawl-color-surface);
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
[data-scrawl-portal] .scrawl-board__inline-editor-actions button {
|
|
525
|
+
background: transparent;
|
|
526
|
+
border: 0;
|
|
527
|
+
border-radius: var(--scrawl-radius-control);
|
|
528
|
+
color: var(--scrawl-color-text);
|
|
529
|
+
cursor: pointer;
|
|
530
|
+
min-block-size: 44px;
|
|
531
|
+
min-inline-size: 44px;
|
|
532
|
+
}
|
|
533
|
+
[data-scrawl-portal] .scrawl-board__inline-editor-actions button:hover { background: var(--scrawl-color-surface-muted); }
|
|
534
|
+
[data-scrawl-root] .scrawl-board__style-shelf[data-tool="table"] { inline-size: min(180px, calc(100% - 90px)); }
|
|
535
|
+
[data-scrawl-root] .scrawl-board__table-picker { display: grid; gap: 12px; padding: 8px; inline-size: 100%; }
|
|
536
|
+
[data-scrawl-root] .scrawl-board__table-preview { display: grid; gap: 3px; block-size: 72px; }
|
|
537
|
+
[data-scrawl-root] .scrawl-board__table-preview span { background: var(--scrawl-color-selection); border-radius: 2px; }
|
|
538
|
+
[data-scrawl-root] .scrawl-board__table-picker output { text-align: center; font-weight: 600; }
|
|
539
|
+
[data-scrawl-root] .scrawl-board__table-dimensions, [data-scrawl-root] .scrawl-board__table-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
|
|
540
|
+
[data-scrawl-root] .scrawl-board__table-dimensions label { display: grid; gap: 4px; font-size: 12px; color: var(--scrawl-color-text-muted); }
|
|
541
|
+
[data-scrawl-root] .scrawl-board__table-dimensions input { width: 100%; min-height: 44px; padding: 4px 6px; background: var(--scrawl-color-surface-raised); border: 0; border-radius: 4px; color: var(--scrawl-color-text); }
|
|
542
|
+
[data-scrawl-root] .scrawl-board__style-shelf[data-tool="note"],
|
|
543
|
+
[data-scrawl-root] .scrawl-board__style-shelf[data-tool="highlighter"] { inline-size: 138px; }
|
|
544
|
+
[data-scrawl-root] .scrawl-board__style-shelf[data-tool="note"] button,
|
|
545
|
+
[data-scrawl-root] .scrawl-board__style-shelf[data-tool="highlighter"] button { min-height: 60px; padding: 4px; }
|
|
546
|
+
[data-scrawl-root] .scrawl-board__style-shelf[data-tool="note"] button span[aria-hidden],
|
|
547
|
+
[data-scrawl-root] .scrawl-board__style-shelf[data-tool="highlighter"] button span[aria-hidden] { width: 48px; height: 48px; border-radius: 2px; }
|
|
548
|
+
[data-scrawl-root] .scrawl-board__picker-options:has(.scrawl-board__color-chip) { grid-template-columns: repeat(2, 56px); }
|
|
549
|
+
[data-scrawl-root] .scrawl-board__picker-options .scrawl-board__color-chip { width: 44px; height: 44px; border-radius: 2px; }
|
|
550
|
+
[data-scrawl-root] .scrawl-board__color-chip { border-radius: 2px; }
|
|
551
|
+
[data-scrawl-portal] .scrawl-board__tooltip {
|
|
552
|
+
position: fixed;
|
|
553
|
+
z-index: 100;
|
|
554
|
+
max-width: 220px;
|
|
555
|
+
padding: 7px 10px;
|
|
556
|
+
border-radius: 5px;
|
|
557
|
+
background: var(--scrawl-color-text);
|
|
558
|
+
color: var(--scrawl-color-surface);
|
|
559
|
+
font-size: 12px;
|
|
560
|
+
line-height: 1.4;
|
|
561
|
+
pointer-events: auto;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
/* Emoji & icons tool: one tab per set, each sized to fit without scrolling
|
|
565
|
+
(the largest, 56 icons, is 7 rows of 8). */
|
|
566
|
+
[data-scrawl-root] .scrawl-board__style-shelf[data-tool="stamp"] { inline-size: min(320px, calc(100% - 90px)); align-items: stretch; }
|
|
567
|
+
[data-scrawl-root] .scrawl-board__sticker-picker { display: flex; flex-direction: column; gap: 6px; inline-size: 100%; min-block-size: 0; }
|
|
568
|
+
[data-scrawl-root] .scrawl-board__sticker-search {
|
|
569
|
+
background: var(--scrawl-color-surface-raised);
|
|
570
|
+
border: 1px solid var(--scrawl-color-edge);
|
|
571
|
+
border-radius: var(--scrawl-radius-control);
|
|
572
|
+
font-size: 13px;
|
|
573
|
+
inline-size: 100%;
|
|
574
|
+
padding: 6px 8px;
|
|
575
|
+
}
|
|
576
|
+
[data-scrawl-root] .scrawl-board__sticker-tabs { display: flex; gap: 2px; border-block-end: 1px solid var(--scrawl-color-edge); }
|
|
577
|
+
[data-scrawl-root] .scrawl-board__sticker-tabs [role="tab"] {
|
|
578
|
+
background: transparent;
|
|
579
|
+
border: 0;
|
|
580
|
+
border-block-end: 2px solid transparent;
|
|
581
|
+
border-radius: 0;
|
|
582
|
+
color: var(--scrawl-color-text-muted);
|
|
583
|
+
flex: 1;
|
|
584
|
+
font-size: 13px;
|
|
585
|
+
margin-block-end: -1px;
|
|
586
|
+
min-block-size: 32px;
|
|
587
|
+
min-inline-size: 0;
|
|
588
|
+
padding: 4px 6px;
|
|
589
|
+
}
|
|
590
|
+
[data-scrawl-root] .scrawl-board__sticker-tabs [role="tab"][aria-selected="true"] { border-block-end-color: var(--scrawl-color-focus); color: var(--scrawl-color-text); font-weight: var(--scrawl-font-weight-strong); }
|
|
591
|
+
[data-scrawl-root] .scrawl-board__sticker-count { color: var(--scrawl-color-text-muted); font-weight: var(--scrawl-font-weight); }
|
|
592
|
+
/* All three tab panels share one grid cell, so the shelf is always as tall as
|
|
593
|
+
the tallest set and switching tabs never resizes (or moves) it. */
|
|
594
|
+
[data-scrawl-root] .scrawl-board__sticker-panels { display: grid; }
|
|
595
|
+
[data-scrawl-root] .scrawl-board__sticker-panel { grid-area: 1 / 1; }
|
|
596
|
+
[data-scrawl-root] .scrawl-board__sticker-panel[data-active="false"] { visibility: hidden; }
|
|
597
|
+
[data-scrawl-root] .scrawl-board__sticker-grid { display: grid; gap: 2px; grid-template-columns: repeat(8, minmax(0, 1fr)); }
|
|
598
|
+
[data-scrawl-root] .scrawl-board__sticker-grid button {
|
|
599
|
+
align-items: center;
|
|
600
|
+
aspect-ratio: 1;
|
|
601
|
+
background: transparent;
|
|
602
|
+
border: 0;
|
|
603
|
+
border-radius: var(--scrawl-radius-control);
|
|
604
|
+
display: flex;
|
|
605
|
+
justify-content: center;
|
|
606
|
+
min-block-size: 0;
|
|
607
|
+
min-inline-size: 0;
|
|
608
|
+
padding: 5px;
|
|
609
|
+
}
|
|
610
|
+
[data-scrawl-root] .scrawl-board__sticker-grid button:hover { background: var(--scrawl-color-surface-muted); }
|
|
611
|
+
[data-scrawl-root] .scrawl-board__sticker-grid button[aria-pressed="true"] { background: var(--scrawl-color-selection); }
|
|
612
|
+
[data-scrawl-root] .scrawl-board__sticker-grid img { block-size: 100%; display: block; inline-size: 100%; }
|
|
613
|
+
[data-scrawl-root] .scrawl-board__sticker-empty { color: var(--scrawl-color-text-muted); font-size: 12px; margin: 8px 2px; }
|
|
614
|
+
|
|
615
|
+
/* Every floating toolbar and the panels that open from them get the same
|
|
616
|
+
light 1px outline, so each reads as its own surface against the board.
|
|
617
|
+
Kept last so it wins over the per-component `border: 0` resets above. */
|
|
618
|
+
[data-scrawl-root] .scrawl-board__actions,
|
|
619
|
+
[data-scrawl-root] .scrawl-board__tools,
|
|
620
|
+
[data-scrawl-root] .scrawl-board__view,
|
|
621
|
+
[data-scrawl-root] .scrawl-board__ink-bar,
|
|
622
|
+
[data-scrawl-root] .scrawl-board__more-tools,
|
|
623
|
+
[data-scrawl-root] .scrawl-board__style-shelf,
|
|
624
|
+
[data-scrawl-root] .scrawl-board__focus-toolbar,
|
|
625
|
+
[data-scrawl-root] .scrawl-board__picker-options,
|
|
626
|
+
[data-scrawl-portal] .scrawl-board__panel,
|
|
627
|
+
[data-scrawl-portal] .scrawl-board__inline-editor-actions {
|
|
628
|
+
border: 1px solid var(--scrawl-color-chrome-border);
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
/* Notebook layout: a full-width header (notebook switcher left, board
|
|
632
|
+
actions right), a sidebar docked under it on the left, and the tool rail
|
|
633
|
+
and breadcrumb just past the sidebar. Container queries respect embedded
|
|
634
|
+
boards. */
|
|
635
|
+
[data-scrawl-root] [data-scrawl-default-ui] {
|
|
636
|
+
container-type: inline-size;
|
|
637
|
+
--scrawl-header-height: 64px;
|
|
638
|
+
--scrawl-sidebar-size: min(440px, 100%);
|
|
639
|
+
/* Space the open sidebar takes from the board. */
|
|
640
|
+
--scrawl-sidebar-width: 0px;
|
|
641
|
+
--scrawl-sidebar-motion: 240ms;
|
|
642
|
+
--scrawl-sidebar-easing: cubic-bezier(0.2, 0, 0, 1);
|
|
643
|
+
}
|
|
644
|
+
[data-scrawl-root] [data-scrawl-default-ui][data-pages-open] { --scrawl-sidebar-width: var(--scrawl-sidebar-size); }
|
|
645
|
+
/* The rail, breadcrumb and welcome slide with the sidebar. */
|
|
646
|
+
[data-scrawl-root] [data-notebook-header] .scrawl-board__tools,
|
|
647
|
+
[data-scrawl-root] [data-notebook-header] .scrawl-board__breadcrumb,
|
|
648
|
+
[data-scrawl-root] [data-notebook-header] .scrawl-board__welcome { transition: inset-inline-start var(--scrawl-sidebar-motion) var(--scrawl-sidebar-easing); }
|
|
649
|
+
|
|
650
|
+
[data-scrawl-root] .scrawl-board__header {
|
|
651
|
+
position: absolute;
|
|
652
|
+
inset-block-start: 0;
|
|
653
|
+
inset-inline: 0;
|
|
654
|
+
block-size: var(--scrawl-header-height);
|
|
655
|
+
z-index: 38;
|
|
656
|
+
display: flex;
|
|
657
|
+
align-items: center;
|
|
658
|
+
padding-inline: 12px;
|
|
659
|
+
background: var(--scrawl-color-surface);
|
|
660
|
+
border-block-end: 1px solid var(--scrawl-color-chrome-border);
|
|
661
|
+
pointer-events: auto;
|
|
662
|
+
}
|
|
663
|
+
[data-scrawl-root] [data-notebook-header] .scrawl-board__actions { inset-block-start: 5px; z-index: 39; }
|
|
664
|
+
|
|
665
|
+
/* The rail and anything that follows it start below the header and after the sidebar. */
|
|
666
|
+
[data-scrawl-root] [data-notebook-header] .scrawl-board__tools {
|
|
667
|
+
inset-block-start: calc(50% + var(--scrawl-header-height) / 2);
|
|
668
|
+
inset-inline-start: calc(var(--scrawl-sidebar-width) + 12px);
|
|
669
|
+
max-block-size: calc(100% - var(--scrawl-header-height) - 96px);
|
|
670
|
+
}
|
|
671
|
+
[data-scrawl-root] [data-notebook-header] .scrawl-board__welcome { inset-block-start: calc(var(--scrawl-header-height) + 60px); inset-inline-start: calc(var(--scrawl-sidebar-width) + 90px); }
|
|
672
|
+
[data-scrawl-root] [data-notebook-header] .scrawl-board__welcome-hint--tools { inset-block-start: calc(var(--scrawl-header-height) + 60px); }
|
|
673
|
+
|
|
674
|
+
[data-scrawl-root] .scrawl-board__notebook-switcher { position: relative; min-inline-size: 0; max-inline-size: calc(100% - 170px); }
|
|
675
|
+
[data-scrawl-root] .scrawl-board__notebook-trigger {
|
|
676
|
+
display: flex;
|
|
677
|
+
align-items: center;
|
|
678
|
+
gap: 10px;
|
|
679
|
+
max-inline-size: 100%;
|
|
680
|
+
min-block-size: 44px;
|
|
681
|
+
padding: 0 12px;
|
|
682
|
+
border: 1px solid var(--scrawl-color-chrome-border);
|
|
683
|
+
border-radius: var(--scrawl-radius-panel);
|
|
684
|
+
background: var(--scrawl-color-surface);
|
|
685
|
+
color: inherit;
|
|
686
|
+
font: inherit;
|
|
687
|
+
cursor: pointer;
|
|
688
|
+
}
|
|
689
|
+
[data-scrawl-root] [data-scrawl-default-ui] .scrawl-board__notebook-trigger { border: 1px solid var(--scrawl-color-chrome-border); padding: 0 12px; }
|
|
690
|
+
[data-scrawl-root] .scrawl-board__notebook-trigger > span:nth-child(2) { flex: 1; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; font-weight: 600; font-size: 15px; }
|
|
691
|
+
[data-scrawl-root] .scrawl-board__notebook-trigger svg { inline-size: 18px; block-size: 18px; flex-shrink: 0; }
|
|
692
|
+
[data-scrawl-root] .scrawl-board__notebook-color { display: inline-block; inline-size: 14px; block-size: 14px; flex-shrink: 0; border-radius: 4px; }
|
|
693
|
+
[data-scrawl-root] .scrawl-board__notebook-dropdown { display: flex; flex-direction: column; position: absolute; inset-block-start: calc(100% + 8px); inset-inline-start: 0; inline-size: 280px; max-inline-size: calc(100cqw - 24px); padding: 8px; background: var(--scrawl-color-surface); border: 1px solid var(--scrawl-color-chrome-border); border-radius: var(--scrawl-radius-panel); }
|
|
694
|
+
[data-scrawl-root] .scrawl-board__notebook-options { overflow-y: auto; max-block-size: 320px; }
|
|
695
|
+
[data-scrawl-root] .scrawl-board__notebook-dropdown button { min-block-size: 44px; min-inline-size: 44px; }
|
|
696
|
+
[data-scrawl-root] .scrawl-board__notebook-dropdown input { inline-size: 100%; min-inline-size: 0; block-size: 44px; background: var(--scrawl-color-surface-raised); border: 0; border-radius: 8px; color: inherit; padding: 8px; font: inherit; }
|
|
697
|
+
[data-scrawl-root] .scrawl-board__notebook-dropdown .scrawl-board__page-select { display: flex; align-items: center; gap: 10px; }
|
|
698
|
+
[data-scrawl-root] .scrawl-board__add-notebook { display: flex; gap: 8px; align-items: center; margin-block-start: 8px; color: var(--scrawl-color-primary); font-weight: 600; }
|
|
699
|
+
|
|
700
|
+
/* Plain-text breadcrumb on the canvas, after the rail. */
|
|
701
|
+
[data-scrawl-root] .scrawl-board__breadcrumb {
|
|
702
|
+
position: absolute;
|
|
703
|
+
inset-block-start: calc(var(--scrawl-header-height) + 8px);
|
|
704
|
+
inset-inline-start: calc(var(--scrawl-sidebar-width) + 76px);
|
|
705
|
+
inset-inline-end: 12px;
|
|
706
|
+
z-index: 20;
|
|
707
|
+
pointer-events: none;
|
|
708
|
+
}
|
|
709
|
+
[data-scrawl-root] .scrawl-board__breadcrumb ol { font-size: 15px; display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; min-block-size: 44px; }
|
|
710
|
+
[data-scrawl-root] .scrawl-board__breadcrumb li { display: flex; align-items: center; gap: 2px; min-inline-size: 0; }
|
|
711
|
+
[data-scrawl-root] .scrawl-board__breadcrumb li > span[aria-hidden] { color: var(--scrawl-color-text-muted); padding-inline: 2px; }
|
|
712
|
+
[data-scrawl-root] .scrawl-board__breadcrumb button, [data-scrawl-root] .scrawl-board__breadcrumb [aria-current] { display: block; max-inline-size: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: auto; }
|
|
713
|
+
[data-scrawl-root] .scrawl-board__breadcrumb button { min-block-size: 44px; min-inline-size: 44px; padding: 0 6px; color: var(--scrawl-color-text-muted); }
|
|
714
|
+
[data-scrawl-root] .scrawl-board__breadcrumb [aria-current] { font-weight: 600; padding-inline: 6px; }
|
|
715
|
+
|
|
716
|
+
/* Docked sidebar: two plain columns split by rules, no boxed cards. */
|
|
717
|
+
[data-scrawl-root] .scrawl-board__pages {
|
|
718
|
+
position: absolute;
|
|
719
|
+
inset-block: var(--scrawl-header-height) 0;
|
|
720
|
+
inset-inline-start: 0;
|
|
721
|
+
inline-size: var(--scrawl-sidebar-size);
|
|
722
|
+
z-index: 37;
|
|
723
|
+
/* Closed: slid off to the start edge, then hidden once the slide ends. */
|
|
724
|
+
transform: translateX(-100%);
|
|
725
|
+
visibility: hidden;
|
|
726
|
+
transition: transform var(--scrawl-sidebar-motion) var(--scrawl-sidebar-easing), visibility 0s linear var(--scrawl-sidebar-motion);
|
|
727
|
+
display: grid;
|
|
728
|
+
grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
|
|
729
|
+
background: color-mix(in srgb, var(--scrawl-color-surface-raised) 55%, var(--scrawl-color-surface));
|
|
730
|
+
border-inline-end: 1px solid var(--scrawl-color-chrome-border);
|
|
731
|
+
color: var(--scrawl-color-text);
|
|
732
|
+
pointer-events: auto;
|
|
733
|
+
}
|
|
734
|
+
[data-scrawl-root] .scrawl-board__pages[data-open] {
|
|
735
|
+
transform: none;
|
|
736
|
+
visibility: visible;
|
|
737
|
+
transition: transform var(--scrawl-sidebar-motion) var(--scrawl-sidebar-easing), visibility 0s;
|
|
738
|
+
}
|
|
739
|
+
[data-scrawl-root] .scrawl-board__pages:dir(rtl):not([data-open]) { transform: translateX(100%); }
|
|
740
|
+
[data-scrawl-root] .scrawl-board__sections-column,
|
|
741
|
+
[data-scrawl-root] .scrawl-board__pages-column { display: flex; flex-direction: column; min-block-size: 0; min-inline-size: 0; }
|
|
742
|
+
[data-scrawl-root] .scrawl-board__sections-column { background: var(--scrawl-color-surface); }
|
|
743
|
+
[data-scrawl-root] .scrawl-board__pages-column { border-inline-start: 1px solid var(--scrawl-color-chrome-border); }
|
|
744
|
+
[data-scrawl-root] .scrawl-board__pages header { display: flex; align-items: center; gap: 2px; min-block-size: 52px; padding-inline: 16px 6px; border-block-end: 1px solid var(--scrawl-color-chrome-border); }
|
|
745
|
+
[data-scrawl-root] .scrawl-board__pages h2 { flex: 1; margin: 0; color: var(--scrawl-color-text-muted); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
|
|
746
|
+
[data-scrawl-root] .scrawl-board__pages h2 span { margin-inline-start: 6px; letter-spacing: 0; font-weight: 400; }
|
|
747
|
+
[data-scrawl-root] .scrawl-board__page-list { flex: 1; min-block-size: 0; overflow-y: auto; padding: 8px; }
|
|
748
|
+
[data-scrawl-root] .scrawl-board__page-row { display: flex; align-items: center; border: 1px solid transparent; border-radius: 10px; margin-block-end: 4px; }
|
|
749
|
+
[data-scrawl-root] .scrawl-board__page-row:hover { background: var(--scrawl-color-surface-muted); }
|
|
750
|
+
[data-scrawl-root] .scrawl-board__sections-column .scrawl-board__page-row[data-active="true"] { background: color-mix(in srgb, var(--scrawl-color-primary) 12%, var(--scrawl-color-surface)); }
|
|
751
|
+
[data-scrawl-root] .scrawl-board__pages-column .scrawl-board__page-row[data-active="true"] { background: var(--scrawl-color-surface); border-color: var(--scrawl-color-chrome-border); }
|
|
752
|
+
[data-scrawl-root] .scrawl-board__notebook-dropdown .scrawl-board__page-row[data-active="true"] { background: var(--scrawl-color-selection); }
|
|
753
|
+
[data-scrawl-root] .scrawl-board__page-row[data-active="true"] .scrawl-board__page-select { font-weight: 600; }
|
|
754
|
+
[data-scrawl-root] .scrawl-board__page-select { flex: 1; min-inline-size: 0; display: flex; align-items: center; gap: 12px; justify-content: flex-start; text-align: start; font-size: 15px; }
|
|
755
|
+
[data-scrawl-root] .scrawl-board__page-select > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
756
|
+
[data-scrawl-root] .scrawl-board__section-spine { inline-size: 4px; block-size: 22px; flex-shrink: 0; border-radius: 2px; }
|
|
757
|
+
[data-scrawl-root] .scrawl-board__page-dot { inline-size: 7px; block-size: 7px; flex-shrink: 0; border-radius: 50%; background: var(--scrawl-color-text-muted); opacity: .6; }
|
|
758
|
+
[data-scrawl-root] .scrawl-board__page-row[data-active="true"] .scrawl-board__page-dot { background: var(--scrawl-color-primary); opacity: 1; }
|
|
759
|
+
[data-scrawl-root] .scrawl-board__pages button { min-block-size: 44px; min-inline-size: 44px; border: 0; background: transparent; color: inherit; border-radius: 8px; padding: 10px; cursor: pointer; }
|
|
760
|
+
[data-scrawl-root] .scrawl-board__pages button:hover, [data-scrawl-root] .scrawl-board__pages button:focus-visible { background: var(--scrawl-color-surface-muted); }
|
|
761
|
+
[data-scrawl-root] .scrawl-board__pages .scrawl-board__page-row button:hover,
|
|
762
|
+
[data-scrawl-root] [data-scrawl-default-ui] .scrawl-board__pages .scrawl-board__page-select[aria-pressed="true"] { background: transparent; color: var(--scrawl-color-text); }
|
|
763
|
+
/* Rename appears on hover or keyboard focus; touch screens always show it. */
|
|
764
|
+
@media (hover: hover) {
|
|
765
|
+
[data-scrawl-root] .scrawl-board__pages .scrawl-board__page-row > button:last-child:not(.scrawl-board__page-select) { opacity: .35; }
|
|
766
|
+
[data-scrawl-root] .scrawl-board__pages .scrawl-board__page-row:hover > button:last-child,
|
|
767
|
+
[data-scrawl-root] .scrawl-board__pages .scrawl-board__page-row:focus-within > button:last-child { opacity: 1; }
|
|
768
|
+
}
|
|
769
|
+
[data-scrawl-root] .scrawl-board__pages header button svg { inline-size: 18px; block-size: 18px; }
|
|
770
|
+
[data-scrawl-root] .scrawl-board__pages input { inline-size: 100%; min-inline-size: 0; block-size: 44px; border: 0; border-radius: 8px; background: var(--scrawl-color-surface-raised); color: inherit; padding: 10px; font: inherit; }
|
|
771
|
+
[data-scrawl-root] .scrawl-board__pages .scrawl-board__add-page { display: flex; align-items: center; justify-content: center; gap: 8px; flex-shrink: 0; margin: 8px; border: 1px dashed var(--scrawl-color-chrome-border); border-radius: 10px; color: var(--scrawl-color-primary); font-weight: 600; }
|
|
772
|
+
[data-scrawl-root] [data-scrawl-default-ui] .scrawl-board__pages .scrawl-board__add-page { border: 1px dashed var(--scrawl-color-chrome-border); }
|
|
773
|
+
[data-scrawl-root] .scrawl-board__pages .scrawl-board__add-page svg { inline-size: 18px; block-size: 18px; }
|
|
774
|
+
|
|
775
|
+
@container (max-width: 600px) {
|
|
776
|
+
/* The sidebar covers the board; its Close button brings the rail back. */
|
|
777
|
+
[data-scrawl-root] [data-scrawl-default-ui][data-pages-open] .scrawl-board__tools,
|
|
778
|
+
[data-scrawl-root] [data-scrawl-default-ui][data-pages-open] .scrawl-board__breadcrumb { visibility: hidden; }
|
|
779
|
+
[data-scrawl-root] [data-scrawl-default-ui][data-pages-open] .scrawl-board__tools { inset-inline-start: 12px; }
|
|
780
|
+
[data-scrawl-root] .scrawl-board__pages { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, .8fr) minmax(0, 1.2fr); }
|
|
781
|
+
[data-scrawl-root] .scrawl-board__pages-column { border-inline-start: 0; border-block-start: 1px solid var(--scrawl-color-chrome-border); }
|
|
782
|
+
/* The header already names the notebook. */
|
|
783
|
+
[data-scrawl-root] .scrawl-board__breadcrumb li:first-child { display: none; }
|
|
784
|
+
[data-scrawl-root] .scrawl-board__breadcrumb li:nth-child(2) > span[aria-hidden] { display: none; }
|
|
785
|
+
[data-scrawl-root] .scrawl-board__notebook-options { max-block-size: 220px; }
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
[data-scrawl-root] .scrawl-board__page-row:has(input) .scrawl-board__page-select { display: none; }
|
|
789
|
+
|
|
790
|
+
/* Default comment composer and thread: a comic speech bubble — thick ink
|
|
791
|
+
outline, solid offset shadow, tail aimed at the pin. */
|
|
792
|
+
[data-scrawl-portal] .scrawl-board__comment-card {
|
|
793
|
+
--scrawl-bubble-ink: var(--scrawl-color-text);
|
|
794
|
+
--scrawl-bubble-line: 3px;
|
|
795
|
+
--scrawl-bubble-shadow: 5px;
|
|
796
|
+
position: absolute;
|
|
797
|
+
z-index: 45;
|
|
798
|
+
display: flex;
|
|
799
|
+
flex-direction: column;
|
|
800
|
+
gap: 10px;
|
|
801
|
+
max-inline-size: calc(100% - 24px);
|
|
802
|
+
padding: 14px 16px;
|
|
803
|
+
background: var(--scrawl-color-surface);
|
|
804
|
+
border: var(--scrawl-bubble-line) solid var(--scrawl-bubble-ink);
|
|
805
|
+
border-radius: 26px;
|
|
806
|
+
box-shadow: var(--scrawl-bubble-shadow) var(--scrawl-bubble-shadow) 0 var(--scrawl-bubble-ink);
|
|
807
|
+
pointer-events: auto;
|
|
808
|
+
}
|
|
809
|
+
[data-scrawl-portal] .scrawl-board__comment-card[data-placement="above"] { transform: translateY(-100%); }
|
|
810
|
+
[data-scrawl-portal] .scrawl-board__comment-tail { position: absolute; overflow: visible; pointer-events: none; }
|
|
811
|
+
[data-scrawl-portal] [data-placement="above"] > .scrawl-board__comment-tail { inset-block-start: calc(100% + 0px); }
|
|
812
|
+
/* Below the pin the tail points up: mirror it onto the top edge. */
|
|
813
|
+
[data-scrawl-portal] [data-placement="below"] > .scrawl-board__comment-tail { inset-block-end: 100%; transform: scaleY(-1); }
|
|
814
|
+
[data-scrawl-portal] .scrawl-board__comment-tail-shadow { fill: var(--scrawl-bubble-ink); }
|
|
815
|
+
[data-scrawl-portal] [data-placement="below"] > .scrawl-board__comment-tail .scrawl-board__comment-tail-shadow { display: none; }
|
|
816
|
+
[data-scrawl-portal] .scrawl-board__comment-tail-fill { fill: var(--scrawl-color-surface); }
|
|
817
|
+
[data-scrawl-portal] .scrawl-board__comment-tail-line { fill: none; stroke: var(--scrawl-bubble-ink); stroke-width: 3px; stroke-linecap: round; stroke-linejoin: round; }
|
|
818
|
+
|
|
819
|
+
[data-scrawl-portal] .scrawl-board__comment-card button { border: 0; border-radius: 999px; background: transparent; color: inherit; cursor: pointer; padding: 0 14px; font-weight: 600; }
|
|
820
|
+
[data-scrawl-portal] .scrawl-board__comment-card button:hover:not(:disabled) { background: var(--scrawl-color-surface-muted); }
|
|
821
|
+
[data-scrawl-portal] .scrawl-board__comment-card button svg { inline-size: 18px; block-size: 18px; }
|
|
822
|
+
[data-scrawl-portal] .scrawl-board__comment-header { display: flex; align-items: center; gap: 8px; margin-block: -6px -2px; }
|
|
823
|
+
[data-scrawl-portal] .scrawl-board__comment-header strong { flex: 1; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
824
|
+
[data-scrawl-portal] .scrawl-board__comment-header button { padding: 0; }
|
|
825
|
+
[data-scrawl-portal] .scrawl-board__comment-avatar { display: grid; place-items: center; inline-size: 26px; block-size: 26px; flex-shrink: 0; border: 2px solid var(--scrawl-bubble-ink); border-radius: 50%; color: #fff; font-size: 12px; font-weight: 700; }
|
|
826
|
+
[data-scrawl-portal] .scrawl-board__comment-badge { padding: 2px 8px; border: 1.5px solid currentColor; border-radius: 999px; color: var(--scrawl-color-success); font-size: 11px; font-weight: 700; }
|
|
827
|
+
[data-scrawl-portal] .scrawl-board__comment-text { margin: 0; font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
828
|
+
[data-scrawl-portal] .scrawl-board__comment-replies { display: flex; flex-direction: column; gap: 8px; max-block-size: 200px; margin: 0; padding: 10px 0 0; overflow-y: auto; list-style: none; border-block-start: 2px dashed color-mix(in srgb, var(--scrawl-bubble-ink) 25%, transparent); }
|
|
829
|
+
[data-scrawl-portal] .scrawl-board__comment-replies strong { font-size: 12px; }
|
|
830
|
+
[data-scrawl-portal] .scrawl-board__comment-replies p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
831
|
+
[data-scrawl-portal] .scrawl-board__comment-composer { display: flex; flex-direction: column; gap: 8px; margin: 0; }
|
|
832
|
+
[data-scrawl-portal] .scrawl-board__comment-composer textarea { inline-size: 100%; min-block-size: 56px; padding: 2px 0; resize: none; border: 0; border-radius: 0; background: transparent; color: inherit; font: inherit; font-size: 15px; line-height: 1.45; }
|
|
833
|
+
[data-scrawl-portal] .scrawl-board__comment-composer textarea::placeholder { color: var(--scrawl-color-text-muted); }
|
|
834
|
+
[data-scrawl-portal] .scrawl-board__comment-actions { display: flex; justify-content: flex-end; gap: 6px; }
|
|
835
|
+
[data-scrawl-portal] .scrawl-board__comment-card .scrawl-board__comment-submit { border: 2px solid var(--scrawl-bubble-ink); background: var(--scrawl-bubble-ink); color: var(--scrawl-color-surface); box-shadow: 2px 2px 0 color-mix(in srgb, var(--scrawl-bubble-ink) 35%, transparent); }
|
|
836
|
+
[data-scrawl-portal] .scrawl-board__comment-card .scrawl-board__comment-submit:hover:not(:disabled) { background: color-mix(in srgb, var(--scrawl-bubble-ink) 85%, var(--scrawl-color-surface)); }
|
|
837
|
+
[data-scrawl-portal] .scrawl-board__comment-card .scrawl-board__comment-submit:disabled { opacity: .35; cursor: default; box-shadow: none; }
|
|
838
|
+
|
|
839
|
+
/* A section selector leaves room for pages in narrow, short embeds. */
|
|
840
|
+
[data-scrawl-root] .scrawl-board__pages .scrawl-board__compact-section { display: none; }
|
|
841
|
+
@container (max-width: 600px) {
|
|
842
|
+
[data-scrawl-root] .scrawl-board__pages { grid-template-rows: minmax(0, 1fr); }
|
|
843
|
+
[data-scrawl-root] .scrawl-board__sections-column { display: none; }
|
|
844
|
+
[data-scrawl-root] .scrawl-board__pages-column { border-block-start: 0; }
|
|
845
|
+
[data-scrawl-root] .scrawl-board__pages header { min-block-size: 44px; padding: 0 4px; flex-shrink: 0; }
|
|
846
|
+
[data-scrawl-root] .scrawl-board__pages header h2,
|
|
847
|
+
[data-scrawl-root] .scrawl-board__pages header [aria-label="New page"] { display: none; }
|
|
848
|
+
[data-scrawl-root] .scrawl-board__pages .scrawl-board__compact-section { display: block; }
|
|
849
|
+
[data-scrawl-root] .scrawl-board__pages select.scrawl-board__compact-section { flex: 1; min-inline-size: 44px; inline-size: 0; min-block-size: 44px; padding: 0 8px; font: inherit; color: inherit; }
|
|
850
|
+
[data-scrawl-root] .scrawl-board__pages .scrawl-board__page-list { padding: 0 4px; }
|
|
851
|
+
[data-scrawl-root] .scrawl-board__pages .scrawl-board__add-page { margin: 0 4px; min-block-size: 44px; padding: 8px; }
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
[data-scrawl-root] .scrawl-board__connector-hint {
|
|
855
|
+
position: absolute; inset-block-end: 68px; inset-inline: 84px 12px;
|
|
856
|
+
text-align: center; color: var(--scrawl-color-text-muted); font-size: 12px;
|
|
857
|
+
pointer-events: none;
|
|
297
858
|
}
|