@a200888213/gbdocx 0.3.0 → 0.5.0
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/README.md +4 -3
- package/index.html +5 -0
- package/package.json +48 -47
- package/serve.mjs +3 -1
- package/src/app/word/edit.js +2 -2
- package/src/app/word/layout.js +5 -2
- package/src/app/word/menus.js +26 -0
- package/src/app/word/view.js +31 -1
- package/src/app/word-app.js +36 -21
- package/src/kernel/docx/menus.js +144 -7
- package/src/kernel/docx/pageGeometry.js +2 -0
- package/src/kernel/editor/engine/blocksStructure.js +19 -1
- package/src/kernel/editor/engine/commands.js +1 -0
- package/src/kernel/editor/engine/dom.js +42 -18
- package/src/kernel/editor/engine/tableInteraction.js +17 -0
- package/src/kernel/editor/engine/tableOps.js +1 -5
- package/src/surface/editor-surface.js +131 -0
- package/src/ui/context-menu.js +4 -1
- package/src/ui/icons.js +99 -2
- package/src/ui/ribbon.js +485 -0
- package/src/ui/toolbar.js +2 -169
- package/styles/app.css +139 -123
- package/styles/tokens.css +5 -5
- package/styles/word-panel.css +9 -49
package/styles/app.css
CHANGED
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
min-height: var(--gbd-re-content-min-h, 100%);
|
|
47
47
|
width: var(--gbd-re-content-w, auto);
|
|
48
48
|
margin: var(--gbd-re-content-m, 0);
|
|
49
|
+
/* 正文随纸层一起下移,首行才落在纸的版心线上(纸层顶部留白见 --gbd-wd-sheet-top) */
|
|
50
|
+
margin-top: var(--gbd-wd-sheet-top, 0px);
|
|
49
51
|
padding: var(--gbd-re-content-pad, 14px 18px);
|
|
50
52
|
outline: none;
|
|
51
53
|
}
|
|
@@ -65,6 +67,7 @@
|
|
|
65
67
|
pointer-events: none;
|
|
66
68
|
}
|
|
67
69
|
|
|
70
|
+
|
|
68
71
|
.word-scope .rich-edit-surface .re-table-layer {
|
|
69
72
|
--gbd-re-handle-thickness: 12px;
|
|
70
73
|
position: absolute;
|
|
@@ -105,6 +108,50 @@
|
|
|
105
108
|
height: var(--gbd-re-handle-thickness);
|
|
106
109
|
border-radius: 0 0 999px 999px;
|
|
107
110
|
}
|
|
111
|
+
|
|
112
|
+
/* 表格移动手柄(⠿):悬停表时浮在纸面上层、落在纸的左边距里,单击选中整表、拖拽换位(Word 口径) */
|
|
113
|
+
.word-scope .rich-edit-surface .re-table-move {
|
|
114
|
+
position: absolute;
|
|
115
|
+
display: flex;
|
|
116
|
+
align-items: center;
|
|
117
|
+
justify-content: center;
|
|
118
|
+
width: 14px;
|
|
119
|
+
height: 20px;
|
|
120
|
+
padding: 0;
|
|
121
|
+
border: none;
|
|
122
|
+
border-radius: 3px;
|
|
123
|
+
background: transparent;
|
|
124
|
+
color: var(--gbd-dt-text-secondary);
|
|
125
|
+
cursor: grab;
|
|
126
|
+
pointer-events: auto;
|
|
127
|
+
transition: background-color var(--gbd-dt-duration-fast) ease, color var(--gbd-dt-duration-fast) ease;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.word-scope .rich-edit-surface .re-table-move:hover {
|
|
131
|
+
background: var(--gbd-dt-accent-soft);
|
|
132
|
+
color: var(--gbd-dt-accent);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.word-scope .rich-edit-surface .re-table-move:active {
|
|
136
|
+
cursor: grabbing;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* 拖表落点线:贴目标块上/下沿的一根强调线(与列宽提示线同层) */
|
|
140
|
+
.word-scope .rich-edit-surface .re-drop-line {
|
|
141
|
+
position: absolute;
|
|
142
|
+
height: 2px;
|
|
143
|
+
margin-top: -1px;
|
|
144
|
+
border-radius: 1px;
|
|
145
|
+
background: var(--gbd-dt-accent);
|
|
146
|
+
pointer-events: none;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* 拖表手势期整面换抓取光标:table 内文字光标一并让位,松手即摘 */
|
|
150
|
+
.word-scope .rich-edit-surface.gbd-is-table-moving,
|
|
151
|
+
.word-scope .rich-edit-surface.gbd-is-table-moving * {
|
|
152
|
+
cursor: grabbing !important;
|
|
153
|
+
}
|
|
154
|
+
|
|
108
155
|
.word-scope .rich-edit-surface .re-table-select {
|
|
109
156
|
position: absolute;
|
|
110
157
|
box-sizing: border-box;
|
|
@@ -195,6 +242,8 @@
|
|
|
195
242
|
}
|
|
196
243
|
|
|
197
244
|
/* ==================== 应用外壳 ==================== */
|
|
245
|
+
/* [设计] 菜单栏 / 文档头 / 功能区 / 状态栏的视觉统一由 gbofficeui 提供;
|
|
246
|
+
本文件只保留应用骨架布局与正文区样式,不写第二份顶栏外观。 */
|
|
198
247
|
|
|
199
248
|
.word-scope .word-app {
|
|
200
249
|
display: flex;
|
|
@@ -203,35 +252,9 @@
|
|
|
203
252
|
min-height: 0;
|
|
204
253
|
}
|
|
205
254
|
|
|
206
|
-
.word-scope .word-head {
|
|
207
|
-
display: flex;
|
|
208
|
-
align-items: center;
|
|
209
|
-
gap: 6px;
|
|
210
|
-
padding: 4px 10px;
|
|
211
|
-
border-bottom: 1px solid var(--gbd-dt-border);
|
|
212
|
-
font-size: 13px;
|
|
213
|
-
}
|
|
214
|
-
.word-scope .word-head__title {
|
|
215
|
-
font-weight: 600;
|
|
216
|
-
}
|
|
217
|
-
.word-scope .word-head__path {
|
|
218
|
-
color: var(--gbd-dt-text-tertiary);
|
|
219
|
-
font-size: 12px;
|
|
220
|
-
}
|
|
221
|
-
.word-scope .word-head__dirty {
|
|
255
|
+
.word-scope .word-head .word-head__dirty {
|
|
222
256
|
color: var(--gbd-dt-warning);
|
|
223
257
|
}
|
|
224
|
-
.word-scope .word-head__spacer {
|
|
225
|
-
flex: 1;
|
|
226
|
-
}
|
|
227
|
-
.word-scope .word-head__auto {
|
|
228
|
-
display: inline-flex;
|
|
229
|
-
align-items: center;
|
|
230
|
-
gap: 4px;
|
|
231
|
-
color: var(--gbd-dt-text-secondary);
|
|
232
|
-
font-size: 12px;
|
|
233
|
-
cursor: pointer;
|
|
234
|
-
}
|
|
235
258
|
|
|
236
259
|
.word-scope .word-main {
|
|
237
260
|
display: flex;
|
|
@@ -317,75 +340,9 @@
|
|
|
317
340
|
border-color: var(--gbd-dt-accent);
|
|
318
341
|
}
|
|
319
342
|
|
|
320
|
-
/* ====================
|
|
321
|
-
|
|
322
|
-
.word-scope .gbd-menubar {
|
|
323
|
-
display: flex;
|
|
324
|
-
align-items: center;
|
|
325
|
-
gap: 2px;
|
|
326
|
-
padding: 2px 8px;
|
|
327
|
-
border-bottom: 1px solid var(--gbd-dt-border);
|
|
328
|
-
}
|
|
329
|
-
.word-scope .gbd-menubar__btn {
|
|
330
|
-
padding: 3px 10px;
|
|
331
|
-
border: none;
|
|
332
|
-
border-radius: 4px;
|
|
333
|
-
background: transparent;
|
|
334
|
-
color: var(--gbd-dt-text);
|
|
335
|
-
font-size: 13px;
|
|
336
|
-
cursor: pointer;
|
|
337
|
-
}
|
|
338
|
-
.word-scope .gbd-menubar__btn:hover,
|
|
339
|
-
.word-scope .gbd-menubar__btn.gbd-is-open {
|
|
340
|
-
background: var(--gbd-dt-hover);
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
/* ==================== 工具栏 ==================== */
|
|
343
|
+
/* ==================== 下拉选择 ==================== */
|
|
344
|
+
/* 注:菜单栏 / 功能区内的尺寸与状态由 gbofficeui 统一,这里只留独立分发时的基础外观 */
|
|
344
345
|
|
|
345
|
-
.word-scope .gbd-toolbar {
|
|
346
|
-
display: flex;
|
|
347
|
-
flex-wrap: wrap;
|
|
348
|
-
align-items: center;
|
|
349
|
-
gap: 2px;
|
|
350
|
-
min-height: 44px;
|
|
351
|
-
padding: 4px 8px;
|
|
352
|
-
border-bottom: 1px solid var(--gbd-dt-border);
|
|
353
|
-
background: var(--gbd-dt-surface);
|
|
354
|
-
}
|
|
355
|
-
.word-scope .gbd-toolbar__group {
|
|
356
|
-
display: flex;
|
|
357
|
-
align-items: center;
|
|
358
|
-
gap: 1px;
|
|
359
|
-
}
|
|
360
|
-
.word-scope .gbd-toolbar__sep {
|
|
361
|
-
width: 1px;
|
|
362
|
-
height: 18px;
|
|
363
|
-
margin: 0 6px;
|
|
364
|
-
background: var(--gbd-dt-border-strong);
|
|
365
|
-
}
|
|
366
|
-
.word-scope .gbd-toolbtn {
|
|
367
|
-
width: 28px;
|
|
368
|
-
height: 28px;
|
|
369
|
-
display: grid;
|
|
370
|
-
place-items: center;
|
|
371
|
-
border: 1px solid transparent;
|
|
372
|
-
border-radius: 4px;
|
|
373
|
-
background: transparent;
|
|
374
|
-
color: var(--gbd-dt-text-secondary);
|
|
375
|
-
cursor: pointer;
|
|
376
|
-
}
|
|
377
|
-
.word-scope .gbd-toolbtn:hover {
|
|
378
|
-
background: var(--gbd-dt-hover);
|
|
379
|
-
color: var(--gbd-dt-text);
|
|
380
|
-
}
|
|
381
|
-
.word-scope .gbd-toolbtn.gbd-is-active {
|
|
382
|
-
background: var(--gbd-dt-accent-soft);
|
|
383
|
-
color: var(--gbd-dt-accent);
|
|
384
|
-
}
|
|
385
|
-
.word-scope .gbd-toolbtn:disabled {
|
|
386
|
-
opacity: 0.4;
|
|
387
|
-
cursor: default;
|
|
388
|
-
}
|
|
389
346
|
.word-scope .gbd-select {
|
|
390
347
|
display: inline-flex;
|
|
391
348
|
align-items: center;
|
|
@@ -404,37 +361,67 @@
|
|
|
404
361
|
overflow: hidden;
|
|
405
362
|
text-overflow: ellipsis;
|
|
406
363
|
white-space: nowrap;
|
|
364
|
+
/* button 的 UA 默认 text-align:center 会继承给 label,WPS 的字体框是左对齐 */
|
|
365
|
+
text-align: left;
|
|
407
366
|
}
|
|
408
367
|
.word-scope .gbd-select__caret {
|
|
409
368
|
color: var(--gbd-dt-text-tertiary);
|
|
410
369
|
}
|
|
411
370
|
|
|
412
|
-
/* ==================== 状态栏 ==================== */
|
|
413
371
|
|
|
414
|
-
|
|
372
|
+
/* ==================== 选项卡栏(Ribbon) ==================== */
|
|
373
|
+
/* 外壳 / 选项卡 / 分组 / 按钮的视觉由 gbofficeui/styles/office-chrome.css 统一,
|
|
374
|
+
本文件只保留 docx 专属的样式卡片(.gbd-rstyle)。 */
|
|
375
|
+
|
|
376
|
+
/* 样式卡片:样式名按自身字号预览(WPS 样式库口径),当前段落样式描边点亮 */
|
|
377
|
+
.word-scope .gbd-rstyle {
|
|
378
|
+
width: 56px;
|
|
379
|
+
height: 52px;
|
|
415
380
|
display: flex;
|
|
416
381
|
align-items: center;
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
border-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
}
|
|
424
|
-
.word-scope .gbd-statusbar__spacer {
|
|
425
|
-
flex: 1;
|
|
426
|
-
}
|
|
427
|
-
.word-scope .gbd-statusbar__btn {
|
|
428
|
-
padding: 2px 8px;
|
|
429
|
-
border: none;
|
|
430
|
-
border-radius: 4px;
|
|
431
|
-
background: transparent;
|
|
432
|
-
color: var(--gbd-dt-text-secondary);
|
|
433
|
-
font-size: 12px;
|
|
382
|
+
justify-content: center;
|
|
383
|
+
padding: 2px;
|
|
384
|
+
border: 1px solid var(--gbd-dt-border-strong);
|
|
385
|
+
border-radius: 6px;
|
|
386
|
+
background: var(--gbd-dt-bg);
|
|
387
|
+
color: var(--gbd-dt-text);
|
|
434
388
|
cursor: pointer;
|
|
389
|
+
overflow: hidden;
|
|
390
|
+
transition: background-color var(--gbd-dt-duration-fast) ease, border-color var(--gbd-dt-duration-fast) ease;
|
|
435
391
|
}
|
|
436
|
-
.word-scope .gbd-
|
|
392
|
+
.word-scope .gbd-rstyle:hover {
|
|
437
393
|
background: var(--gbd-dt-hover);
|
|
394
|
+
border-color: var(--gbd-dt-accent);
|
|
395
|
+
}
|
|
396
|
+
.word-scope .gbd-rstyle:focus-visible {
|
|
397
|
+
outline: 2px solid var(--gbd-dt-accent);
|
|
398
|
+
outline-offset: 1px;
|
|
399
|
+
}
|
|
400
|
+
.word-scope .gbd-rstyle.gbd-is-active {
|
|
401
|
+
border-color: var(--gbd-dt-accent);
|
|
402
|
+
background: var(--gbd-dt-accent-soft);
|
|
403
|
+
}
|
|
404
|
+
.word-scope .gbd-rstyle__preview {
|
|
405
|
+
font-size: 13px;
|
|
406
|
+
line-height: 1.2;
|
|
407
|
+
text-align: center;
|
|
408
|
+
white-space: nowrap;
|
|
409
|
+
color: var(--gbd-dt-text);
|
|
410
|
+
}
|
|
411
|
+
.word-scope .gbd-rstyle__preview--h1 {
|
|
412
|
+
font-size: 16px;
|
|
413
|
+
font-weight: 700;
|
|
414
|
+
}
|
|
415
|
+
.word-scope .gbd-rstyle__preview--h2 {
|
|
416
|
+
font-size: 15px;
|
|
417
|
+
font-weight: 700;
|
|
418
|
+
}
|
|
419
|
+
.word-scope .gbd-rstyle__preview--h3 {
|
|
420
|
+
font-size: 14px;
|
|
421
|
+
font-weight: 600;
|
|
422
|
+
}
|
|
423
|
+
.word-scope .gbd-rstyle.gbd-is-active .gbd-rstyle__preview {
|
|
424
|
+
color: var(--gbd-dt-accent);
|
|
438
425
|
}
|
|
439
426
|
|
|
440
427
|
/* ==================== 侧栏面板 ==================== */
|
|
@@ -535,14 +522,16 @@
|
|
|
535
522
|
}
|
|
536
523
|
|
|
537
524
|
.word-scope .gbd-menu__list {
|
|
538
|
-
min-width:
|
|
539
|
-
padding:
|
|
525
|
+
min-width: 190px;
|
|
526
|
+
padding: 5px;
|
|
540
527
|
}
|
|
541
528
|
.word-scope .gbd-menu__item {
|
|
542
529
|
display: flex;
|
|
543
530
|
align-items: center;
|
|
544
|
-
gap:
|
|
545
|
-
|
|
531
|
+
gap: 8px;
|
|
532
|
+
box-sizing: border-box;
|
|
533
|
+
min-height: 30px;
|
|
534
|
+
padding: 0 8px;
|
|
546
535
|
border-radius: 4px;
|
|
547
536
|
font-size: 13px;
|
|
548
537
|
white-space: nowrap;
|
|
@@ -562,9 +551,19 @@
|
|
|
562
551
|
color: var(--gbd-dt-danger);
|
|
563
552
|
}
|
|
564
553
|
.word-scope .gbd-menu__lead {
|
|
565
|
-
width:
|
|
554
|
+
width: 18px;
|
|
566
555
|
display: inline-flex;
|
|
556
|
+
align-items: center;
|
|
567
557
|
justify-content: center;
|
|
558
|
+
flex: none;
|
|
559
|
+
color: var(--gbd-dt-text-secondary);
|
|
560
|
+
}
|
|
561
|
+
.word-scope .gbd-menu__lead svg {
|
|
562
|
+
width: 15px;
|
|
563
|
+
height: 15px;
|
|
564
|
+
}
|
|
565
|
+
.word-scope .gbd-menu__item.gbd-is-disabled .gbd-menu__lead {
|
|
566
|
+
opacity: 0.55;
|
|
568
567
|
}
|
|
569
568
|
.word-scope .gbd-menu__dot {
|
|
570
569
|
width: 12px;
|
|
@@ -576,15 +575,18 @@
|
|
|
576
575
|
flex: 1;
|
|
577
576
|
}
|
|
578
577
|
.word-scope .gbd-menu__shortcut {
|
|
578
|
+
margin-left: 16px;
|
|
579
579
|
color: var(--gbd-dt-text-tertiary);
|
|
580
580
|
font-size: 11px;
|
|
581
581
|
}
|
|
582
582
|
.word-scope .gbd-menu__arrow {
|
|
583
|
+
display: inline-flex;
|
|
584
|
+
margin-left: 8px;
|
|
583
585
|
color: var(--gbd-dt-text-tertiary);
|
|
584
586
|
}
|
|
585
587
|
.word-scope .gbd-menu__sep {
|
|
586
588
|
height: 1px;
|
|
587
|
-
margin: 4px
|
|
589
|
+
margin: 4px 2px;
|
|
588
590
|
background: var(--gbd-dt-border);
|
|
589
591
|
}
|
|
590
592
|
.word-scope .gbd-menu__input {
|
|
@@ -910,11 +912,25 @@
|
|
|
910
912
|
word-break: break-word;
|
|
911
913
|
}
|
|
912
914
|
|
|
915
|
+
/* ==================== 预览模式 ==================== */
|
|
916
|
+
/* 只留文件头(标题/路径 + 退出预览)与正文;菜单、功能区、状态栏、侧栏等编辑界面全部收起 */
|
|
917
|
+
.word-scope .word-app.gb-is-preview .gbo-head__actions,
|
|
918
|
+
.word-scope .word-app.gb-is-preview .gbd-toolbar-host,
|
|
919
|
+
.word-scope .word-app.gb-is-preview .gbd-statusbar-host,
|
|
920
|
+
.word-scope .word-app.gb-is-preview .gbd-panel,
|
|
921
|
+
.word-scope .word-app.gb-is-preview .gbd-findbar,
|
|
922
|
+
.word-scope .word-app.gb-is-preview .word-chars-pop {
|
|
923
|
+
display: none;
|
|
924
|
+
}
|
|
925
|
+
/* 预览档本体也是只读档,但退出按钮不能被只读档的 55% 透明度压暗 */
|
|
926
|
+
.word-scope .word-app.gb-is-preview .word-head {
|
|
927
|
+
opacity: 1;
|
|
928
|
+
}
|
|
929
|
+
|
|
913
930
|
/* ==================== 只读档 ==================== */
|
|
914
931
|
/* 编辑控件已被 inert,压低视觉权重但不改底色;禁用态背景属状态反馈,不受静态背景约束 */
|
|
915
|
-
.word-scope .word-app.gb-is-readonly .word-head,
|
|
932
|
+
.word-scope .word-app.gb-is-readonly:not(.gb-is-preview) .word-head,
|
|
916
933
|
.word-scope .word-app.gb-is-readonly .gbd-toolbar-host { opacity: .55; }
|
|
917
|
-
.word-scope .gbd-menubar__btn:disabled { opacity: .5; cursor: default; }
|
|
918
934
|
|
|
919
935
|
/* ==================== 打印 ==================== */
|
|
920
936
|
@media print {
|
package/styles/tokens.css
CHANGED
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
--gbd-dt-accent-soft-strong: rgba(42, 107, 255, 0.3);
|
|
10
10
|
--gbd-dt-accent-fill: rgba(42, 107, 255, 0.42);
|
|
11
11
|
|
|
12
|
-
--gbd-dt-surface: #
|
|
12
|
+
--gbd-dt-surface: #ffffff;
|
|
13
13
|
--gbd-dt-surface-2: rgba(255, 255, 255, 0.72);
|
|
14
14
|
--gbd-dt-surface-3: rgba(255, 255, 255, 0.55);
|
|
15
15
|
|
|
16
16
|
--gbd-dt-bg: #ffffff;
|
|
17
|
-
--gbd-dt-bg-2: #
|
|
18
|
-
--gbd-dt-bg-3: #
|
|
19
|
-
--gbd-dt-scrim: #
|
|
17
|
+
--gbd-dt-bg-2: #ffffff;
|
|
18
|
+
--gbd-dt-bg-3: #ffffff;
|
|
19
|
+
--gbd-dt-scrim: #ffffff;
|
|
20
20
|
--gbd-dt-media-overlay: rgba(0, 0, 0, 0.68);
|
|
21
21
|
|
|
22
22
|
--gbd-dt-text: #171a1f;
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
color: var(--gbd-dt-text);
|
|
140
140
|
background: var(--gbd-dt-bg);
|
|
141
141
|
font-family: 'Microsoft YaHei', -apple-system, 'Segoe UI', sans-serif;
|
|
142
|
-
font-size:
|
|
142
|
+
font-size: 13px;
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
.gbd-root {
|
package/styles/word-panel.css
CHANGED
|
@@ -28,9 +28,6 @@
|
|
|
28
28
|
--gbd-wd-option-active: #e2e6ed; /* 下拉项 active 底 */
|
|
29
29
|
--gbd-wd-option-pad: 5px; /* 下拉项内边距 */
|
|
30
30
|
--gbd-wd-option-gap: 5px 0; /* 下拉项纵向间距 */
|
|
31
|
-
--gbd-wd-item-size: 28px; /* 工具条目热区(保持本项目 28,不收敛 canvas 的 24) */
|
|
32
|
-
--gbd-wd-toolbar-h: 60px; /* 工具条视觉高度(min-height) */
|
|
33
|
-
--gbd-wd-statusbar-h: 30px; /* 状态栏高度 */
|
|
34
31
|
--gbd-wd-catalog-w: 250px; /* 目录侧栏宽度 */
|
|
35
32
|
--gbd-wd-comments-w: 250px; /* 批注侧栏宽度 */
|
|
36
33
|
}
|
|
@@ -53,14 +50,7 @@
|
|
|
53
50
|
background: var(--gbd-dt-bg);
|
|
54
51
|
}
|
|
55
52
|
|
|
56
|
-
/*
|
|
57
|
-
.word-scope .word-head {
|
|
58
|
-
display: flex;
|
|
59
|
-
align-items: center;
|
|
60
|
-
gap: 6px;
|
|
61
|
-
padding: 4px 10px;
|
|
62
|
-
border-bottom: 1px solid var(--gbd-dt-border);
|
|
63
|
-
}
|
|
53
|
+
/* 头部行:标题/路径/操作按钮的排版统一在 gbofficeui,应用侧不再覆盖 */
|
|
64
54
|
|
|
65
55
|
/* 主体行:目录面板 + 编辑面 + 批注面板横向排布;窄窗靠 flex 收缩消化(不写视口媒体查询) */
|
|
66
56
|
.word-scope .word-main {
|
|
@@ -77,8 +67,7 @@
|
|
|
77
67
|
min-width: 0;
|
|
78
68
|
min-height: 0;
|
|
79
69
|
|
|
80
|
-
/* [设计]
|
|
81
|
-
画布与纸面的层次由纸面阴影/边框给出,不用灰色填充铺底 */
|
|
70
|
+
/* [设计] 画布与纸面同为默认表面色(无灰色铺底):层次由纸面描边/投影给出 */
|
|
82
71
|
background: var(--gbd-dt-surface);
|
|
83
72
|
}
|
|
84
73
|
|
|
@@ -88,25 +77,6 @@
|
|
|
88
77
|
display: none !important;
|
|
89
78
|
}
|
|
90
79
|
|
|
91
|
-
/* ==================== 工具栏(docx 外层覆盖) ==================== */
|
|
92
|
-
|
|
93
|
-
/* [设计] office.scss 是办公三件套共用文件(三家共用禁各写一份),故工具栏的收窄调整一律在此用 docx 专属
|
|
94
|
-
外层类 .word-toolbar 覆盖,保持 office.scss 中性零改动,不波及 xlsx/pptx。
|
|
95
|
-
[约束] TopBar【强制通道】的行壳结构/收纳逻辑不动,这里只改视觉。 */
|
|
96
|
-
.word-scope .word-toolbar.of-toolbar {
|
|
97
|
-
/* 视觉高度向 canvas 工具条 60px 靠:content-box 加内边距,不改 TopBar 结构(条目仍 28×28) */
|
|
98
|
-
min-height: var(--gbd-wd-toolbar-h);
|
|
99
|
-
align-items: center;
|
|
100
|
-
background: var(--gbd-dt-surface);
|
|
101
|
-
border-bottom: 1px solid var(--gbd-dt-border);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/* 分组分隔线:canvas .menu-divider 口径(1×16 + #cfd2d8),覆盖 office.scss 的 1×18 + --gbd-dt-border */
|
|
105
|
-
.word-scope .word-toolbar .of-toolbar-sep {
|
|
106
|
-
height: 16px;
|
|
107
|
-
background: var(--gbd-dt-border-strong);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
80
|
/* ==================== 页内浮件 ==================== */
|
|
111
81
|
|
|
112
82
|
/* 特殊字符浮盘:吸在工具栏下沿右侧(工具栏行底 = 菜单栏 31 + 头部 35 + 工具条 37)
|
|
@@ -266,7 +236,8 @@
|
|
|
266
236
|
/* [设计] 纸永远白、纸面文字近黑:Word 画布走 Word 保真,不随主题令牌走(与 content.scss 的画布口径一致) */
|
|
267
237
|
.word-sheets {
|
|
268
238
|
position: absolute;
|
|
269
|
-
top
|
|
239
|
+
/* 屏幕态纸上沿留出画布留白(应用按 --gbd-wd-sheet-top 下发,打印态归零) */
|
|
240
|
+
top: var(--gbd-wd-sheet-top, 0px);
|
|
270
241
|
left: 50%;
|
|
271
242
|
z-index: 0;
|
|
272
243
|
transform: translateX(-50%);
|
|
@@ -278,7 +249,8 @@
|
|
|
278
249
|
right: 0;
|
|
279
250
|
left: 0;
|
|
280
251
|
background: #fff;
|
|
281
|
-
|
|
252
|
+
/* 1px 极浅描边定出纸上沿,外圈投影让纸浮在画布上(Word 口径) */
|
|
253
|
+
box-shadow: 0 0 0 1px rgb(23 26 31 / 7%), 0 2px 14px rgb(23 26 31 / 18%);
|
|
282
254
|
}
|
|
283
255
|
|
|
284
256
|
/* 页眉/页脚(受限富文本:双击带就地编辑,普通操作走页面设置对话框) */
|
|
@@ -388,26 +360,14 @@
|
|
|
388
360
|
--gbd-wd-gutter: 0px;
|
|
389
361
|
}
|
|
390
362
|
|
|
391
|
-
|
|
392
|
-
.word-scope .word-app .word-head,
|
|
393
|
-
.word-scope .word-app .word-toolbar,
|
|
394
|
-
.word-scope .word-app .word-statusbar,
|
|
395
|
-
.word-scope .word-app .word-toc,
|
|
396
|
-
.word-scope .word-app .word-cmt,
|
|
397
|
-
.word-scope .word-app .word-chars-pop {
|
|
398
|
-
display: none !important;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
.word-scope .word-app .word-main,
|
|
402
|
-
.word-scope .word-app .word-editor {
|
|
403
|
-
display: block;
|
|
404
|
-
background: #fff;
|
|
405
|
-
}
|
|
363
|
+
/* 界面件隐藏与主区摊平由 app.css 的打印块统一负责,这里只处理纸面几何 */
|
|
406
364
|
|
|
407
365
|
/* [坑] 屏幕缩放(页面行内挂在 .word-editor 的 zoom)与滚动容器都会毁掉出纸:
|
|
408
366
|
前者让内容超出纸宽裁掉,后者的 overflow:auto 只印可见那一屏,两者必须一并摊平 */
|
|
409
367
|
.word-scope .word-app .word-editor {
|
|
410
368
|
zoom: 1 !important;
|
|
369
|
+
/* 纸层顶部留白只属于屏幕画布:打印面纸贴纸,变量由应用行内下发,这里必须盖掉 */
|
|
370
|
+
--gbd-wd-sheet-top: 0px !important;
|
|
411
371
|
}
|
|
412
372
|
|
|
413
373
|
.word-scope .word-app .rich-edit-surface,
|