@a200888213/gbdocx 0.6.2 → 0.6.3

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/styles/app.css CHANGED
@@ -1,970 +1,970 @@
1
- /* [文件] gbdocx·应用外壳样式 —— 编辑器宿主浮件层 + 菜单栏/工具栏/状态栏/面板/浮层/对话框/通知 */
2
-
3
- /* ==================== 编辑器宿主(.rich-edit-surface:移植 EditorSurface.vue 的 scoped 样式) ==================== */
4
-
5
- .word-scope .rich-edit-surface {
6
- position: relative;
7
- display: flex;
8
- flex-direction: column;
9
- width: 100%;
10
- min-height: 0;
11
- overflow: hidden;
12
- }
13
- .word-scope .rich-edit-surface.gbd-is-fill {
14
- height: 100%;
15
- }
16
-
17
- .word-scope .rich-edit-surface .re-scroll {
18
- position: relative;
19
- flex: 1;
20
- min-width: 0;
21
- overflow-y: auto;
22
- overflow-x: auto;
23
- }
24
-
25
- .word-scope .rich-edit-surface .re-backdrop-host {
26
- position: absolute;
27
- inset: 0;
28
- pointer-events: none;
29
- }
30
-
31
- /* 浮件坐标探针(宽度由 overlayGeometry.PROBE_WIDTH 下发) */
32
- .word-scope .rich-edit-surface .re-overlay-probe {
33
- position: absolute;
34
- top: 0;
35
- left: 0;
36
- height: 0;
37
- pointer-events: none;
38
- }
39
-
40
- .word-scope .rich-edit-surface .re-content {
41
- /* 显式压住纸面层(不依赖 word-panel.css 里的嵌套选择器解析结果)*/
42
- position: relative;
43
- z-index: 1;
44
- flex: 1;
45
- box-sizing: border-box;
46
- min-height: var(--gbd-re-content-min-h, 100%);
47
- width: var(--gbd-re-content-w, auto);
48
- margin: var(--gbd-re-content-m, 0);
49
- /* 正文随纸层一起下移,首行才落在纸的版心线上(纸层顶部留白见 --gbd-wd-sheet-top) */
50
- margin-top: var(--gbd-wd-sheet-top, 0px);
51
- padding: var(--gbd-re-content-pad, 14px 18px);
52
- outline: none;
53
- }
54
-
55
- /* 纸面层只作背景,不接收指针(页眉页脚带自带 pointer-events:auto 例外) */
56
- .word-scope .rich-edit-surface .word-sheets {
57
- pointer-events: none;
58
- z-index: 0;
59
- }
60
-
61
- .word-scope .rich-edit-surface .re-marquee {
62
- position: absolute;
63
- z-index: 8;
64
- box-sizing: border-box;
65
- border: 1px solid var(--gbd-dt-accent);
66
- background: var(--gbd-dt-accent-soft);
67
- pointer-events: none;
68
- }
69
-
70
-
71
- .word-scope .rich-edit-surface .re-table-layer {
72
- --gbd-re-handle-thickness: 12px;
73
- position: absolute;
74
- inset: 0;
75
- overflow: visible;
76
- z-index: 7;
77
- pointer-events: none;
78
- }
79
- .word-scope .rich-edit-surface .re-table-handles {
80
- position: absolute;
81
- inset: 0;
82
- pointer-events: none;
83
- }
84
- .word-scope .rich-edit-surface .re-table-handle {
85
- position: absolute;
86
- display: flex;
87
- align-items: center;
88
- justify-content: center;
89
- padding: 0;
90
- border: none;
91
- background: var(--gbd-dt-surface);
92
- color: var(--gbd-dt-text-secondary);
93
- font-size: 14px;
94
- line-height: 1;
95
- cursor: pointer;
96
- pointer-events: auto;
97
- transition: background-color var(--gbd-dt-duration-fast) ease, color var(--gbd-dt-duration-fast) ease;
98
- }
99
- .word-scope .rich-edit-surface .re-table-handle:hover {
100
- background: var(--gbd-dt-accent-soft);
101
- color: var(--gbd-dt-accent);
102
- }
103
- .word-scope .rich-edit-surface .re-table-handle.gbd-is-column {
104
- width: var(--gbd-re-handle-thickness);
105
- border-radius: 0 999px 999px 0;
106
- }
107
- .word-scope .rich-edit-surface .re-table-handle.gbd-is-row {
108
- height: var(--gbd-re-handle-thickness);
109
- border-radius: 0 0 999px 999px;
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
-
155
- .word-scope .rich-edit-surface .re-table-select {
156
- position: absolute;
157
- box-sizing: border-box;
158
- border: 1px solid var(--gbd-dt-accent);
159
- background: var(--gbd-dt-accent-soft);
160
- pointer-events: none;
161
- }
162
- .word-scope .rich-edit-surface .re-col-line {
163
- position: absolute;
164
- width: 6px;
165
- margin-left: -3px;
166
- pointer-events: none;
167
- }
168
- .word-scope .rich-edit-surface .re-col-line::after {
169
- content: '';
170
- position: absolute;
171
- top: 0;
172
- left: 2px;
173
- width: 2px;
174
- height: 100%;
175
- background: var(--gbd-dt-accent-hover);
176
- }
177
-
178
- .word-scope .rich-edit-surface .re-resize-box {
179
- position: absolute;
180
- z-index: 6;
181
- pointer-events: none;
182
- }
183
- .word-scope .rich-edit-surface .re-zoom-btn {
184
- position: absolute;
185
- top: -12px;
186
- left: 50%;
187
- width: 24px;
188
- height: 24px;
189
- padding: 0;
190
- display: grid;
191
- place-items: center;
192
- transform: translateX(-50%);
193
- border: 1px solid var(--gbd-dt-border-strong);
194
- border-radius: 50%;
195
- background: var(--gbd-dt-surface);
196
- box-shadow: var(--gbd-dt-shadow-popup);
197
- color: var(--gbd-dt-text-secondary);
198
- cursor: pointer;
199
- pointer-events: auto;
200
- }
201
- .word-scope .rich-edit-surface .re-zoom-btn:hover {
202
- border-color: var(--gbd-dt-accent);
203
- background: var(--gbd-dt-accent-soft);
204
- color: var(--gbd-dt-accent);
205
- }
206
- .word-scope .rich-edit-surface .re-resize-handle {
207
- position: absolute;
208
- width: 10px;
209
- height: 10px;
210
- box-sizing: border-box;
211
- border: 2px solid var(--gbd-dt-surface);
212
- border-radius: 50%;
213
- background: var(--gbd-dt-accent);
214
- box-shadow: 0 0 0 1px var(--gbd-dt-border-strong);
215
- pointer-events: auto;
216
- cursor: nwse-resize;
217
- }
218
- .word-scope .rich-edit-surface .re-resize-handle.gbd-is-top-left { left: -5px; top: -5px; }
219
- .word-scope .rich-edit-surface .re-resize-handle.gbd-is-top-right { right: -5px; top: -5px; cursor: nesw-resize; }
220
- .word-scope .rich-edit-surface .re-resize-handle.gbd-is-bottom-left { left: -5px; bottom: -5px; cursor: nesw-resize; }
221
- .word-scope .rich-edit-surface .re-resize-handle.gbd-is-bottom-right { right: -5px; bottom: -5px; }
222
-
223
- .word-scope .rich-edit-surface .re-image-viewer {
224
- position: fixed;
225
- inset: 0;
226
- z-index: 400;
227
- display: flex;
228
- align-items: center;
229
- justify-content: center;
230
- background: var(--gbd-dt-media-overlay);
231
- cursor: zoom-out;
232
- }
233
- /* [坑] 上面的 display:flex 特异性高于 [hidden] 的 UA display:none:不补这条,
234
- hidden 的图片查看器会常驻成一层深色遮罩(并挡住编辑区点击) */
235
- .word-scope .rich-edit-surface .re-image-viewer[hidden] {
236
- display: none;
237
- }
238
- .word-scope .rich-edit-surface .re-image-viewer img {
239
- max-width: 92%;
240
- max-height: 92%;
241
- object-fit: contain;
242
- }
243
-
244
- /* ==================== 应用外壳 ==================== */
245
- /* [设计] 菜单栏 / 文档头 / 功能区 / 状态栏的视觉统一由 gbofficeui 提供;
246
- 本文件只保留应用骨架布局与正文区样式,不写第二份顶栏外观。 */
247
-
248
- .word-scope .word-app {
249
- display: flex;
250
- flex-direction: column;
251
- height: 100%;
252
- min-height: 0;
253
- }
254
-
255
- /* 页面内全屏态:整个 Word 应用铺满视口(文档头留着,恢复按钮在同一位置) */
256
- .word-scope .word-app.gbd-is-pagefullscreen {
257
- position: fixed;
258
- inset: 0;
259
- z-index: 500;
260
- width: 100%;
261
- height: 100%;
262
- background: var(--gbd-dt-bg);
263
- }
264
-
265
- .word-scope .word-head .word-head__dirty {
266
- color: var(--gbd-dt-warning);
267
- }
268
-
269
- .word-scope .word-main {
270
- display: flex;
271
- flex: 1;
272
- min-width: 0;
273
- min-height: 0;
274
- }
275
- .word-scope .word-editor {
276
- position: relative;
277
- display: flex;
278
- flex: 1;
279
- min-width: 0;
280
- min-height: 0;
281
- }
282
- .word-scope .word-editor-mount {
283
- display: flex;
284
- flex: 1;
285
- min-width: 0;
286
- min-height: 0;
287
- }
288
-
289
- /* ==================== 按钮 ==================== */
290
-
291
- .word-scope .gbd-btn {
292
- padding: 4px 12px;
293
- border: 1px solid var(--gbd-dt-border-strong);
294
- border-radius: 6px;
295
- background: var(--gbd-dt-bg);
296
- color: var(--gbd-dt-text);
297
- font-size: 13px;
298
- cursor: pointer;
299
- transition: background-color var(--gbd-dt-duration-fast) ease, border-color var(--gbd-dt-duration-fast) ease;
300
- }
301
- .word-scope .gbd-btn:hover {
302
- border-color: var(--gbd-dt-accent);
303
- background: var(--gbd-dt-accent-soft);
304
- }
305
- .word-scope .gbd-btn--gbd-primary {
306
- border-color: var(--gbd-dt-accent);
307
- background: var(--gbd-dt-accent);
308
- color: var(--gbd-dt-on-accent);
309
- }
310
- .word-scope .gbd-btn--gbd-primary:hover {
311
- background: var(--gbd-dt-accent-hover);
312
- }
313
- .word-scope .gbd-linkbtn {
314
- padding: 0;
315
- border: none;
316
- background: none;
317
- color: var(--gbd-dt-accent);
318
- font-size: 12px;
319
- cursor: pointer;
320
- }
321
- .word-scope .gbd-linkbtn--gbd-danger {
322
- color: var(--gbd-dt-danger);
323
- }
324
- .word-scope .gbd-iconbtn {
325
- width: 24px;
326
- height: 24px;
327
- display: grid;
328
- place-items: center;
329
- border: 1px solid transparent;
330
- border-radius: 4px;
331
- background: transparent;
332
- color: var(--gbd-dt-text-secondary);
333
- cursor: pointer;
334
- }
335
- .word-scope .gbd-iconbtn:hover {
336
- background: var(--gbd-dt-hover);
337
- }
338
-
339
- .word-scope .gbd-input {
340
- height: 28px;
341
- padding: 0 8px;
342
- border: 1px solid var(--gbd-dt-border-strong);
343
- border-radius: 4px;
344
- background: var(--gbd-dt-bg);
345
- color: var(--gbd-dt-text);
346
- font-size: 13px;
347
- outline: none;
348
- }
349
- .word-scope .gbd-input:focus {
350
- border-color: var(--gbd-dt-accent);
351
- }
352
-
353
- /* ==================== 下拉选择 ==================== */
354
- /* 注:菜单栏 / 功能区内的尺寸与状态由 gbofficeui 统一,这里只留独立分发时的基础外观 */
355
-
356
- .word-scope .gbd-select {
357
- display: inline-flex;
358
- align-items: center;
359
- gap: 4px;
360
- height: 26px;
361
- padding: 0 6px;
362
- border: 1px solid var(--gbd-dt-border-strong);
363
- border-radius: 4px;
364
- background: var(--gbd-dt-bg);
365
- color: var(--gbd-dt-text);
366
- font-size: 12px;
367
- cursor: pointer;
368
- }
369
- .word-scope .gbd-select__label {
370
- flex: 1;
371
- overflow: hidden;
372
- text-overflow: ellipsis;
373
- white-space: nowrap;
374
- /* button 的 UA 默认 text-align:center 会继承给 label,WPS 的字体框是左对齐 */
375
- text-align: left;
376
- }
377
- .word-scope .gbd-select__caret {
378
- color: var(--gbd-dt-text-tertiary);
379
- }
380
-
381
-
382
- /* ==================== 选项卡栏(Ribbon) ==================== */
383
- /* 外壳 / 选项卡 / 分组 / 按钮的视觉由 gbofficeui/styles/office-chrome.css 统一,
384
- 本文件只保留 docx 专属的样式卡片(.gbd-rstyle)。 */
385
-
386
- /* 样式卡片:样式名按自身字号预览(WPS 样式库口径),当前段落样式描边点亮 */
387
- .word-scope .gbd-rstyle {
388
- width: 56px;
389
- height: 52px;
390
- display: flex;
391
- align-items: center;
392
- justify-content: center;
393
- padding: 2px;
394
- border: 1px solid var(--gbd-dt-border-strong);
395
- border-radius: 6px;
396
- background: var(--gbd-dt-bg);
397
- color: var(--gbd-dt-text);
398
- cursor: pointer;
399
- overflow: hidden;
400
- transition: background-color var(--gbd-dt-duration-fast) ease, border-color var(--gbd-dt-duration-fast) ease;
401
- }
402
- .word-scope .gbd-rstyle:hover {
403
- background: var(--gbd-dt-hover);
404
- border-color: var(--gbd-dt-accent);
405
- }
406
- .word-scope .gbd-rstyle:focus-visible {
407
- outline: 2px solid var(--gbd-dt-accent);
408
- outline-offset: 1px;
409
- }
410
- .word-scope .gbd-rstyle.gbd-is-active {
411
- border-color: var(--gbd-dt-accent);
412
- background: var(--gbd-dt-accent-soft);
413
- }
414
- .word-scope .gbd-rstyle__preview {
415
- font-size: 13px;
416
- line-height: 1.2;
417
- text-align: center;
418
- white-space: nowrap;
419
- color: var(--gbd-dt-text);
420
- }
421
- .word-scope .gbd-rstyle__preview--h1 {
422
- font-size: 16px;
423
- font-weight: 700;
424
- }
425
- .word-scope .gbd-rstyle__preview--h2 {
426
- font-size: 15px;
427
- font-weight: 700;
428
- }
429
- .word-scope .gbd-rstyle__preview--h3 {
430
- font-size: 14px;
431
- font-weight: 600;
432
- }
433
- .word-scope .gbd-rstyle.gbd-is-active .gbd-rstyle__preview {
434
- color: var(--gbd-dt-accent);
435
- }
436
-
437
- /* ==================== 侧栏面板 ==================== */
438
-
439
- .word-scope .gbd-panel {
440
- display: flex;
441
- flex-direction: column;
442
- width: 250px;
443
- min-height: 0;
444
- border-right: 1px solid var(--gbd-dt-border);
445
- background: var(--gbd-dt-bg);
446
- }
447
- .word-scope .gbd-comments {
448
- border-right: none;
449
- border-left: 1px solid var(--gbd-dt-border);
450
- }
451
- .word-scope .gbd-panel__title {
452
- padding: 6px 10px;
453
- border-bottom: 1px solid var(--gbd-dt-border);
454
- color: var(--gbd-dt-text-secondary);
455
- font-size: 12px;
456
- }
457
- .word-scope .gbd-panel__body {
458
- flex: 1;
459
- min-height: 0;
460
- overflow-y: auto;
461
- }
462
- .word-scope .gbd-panel__empty {
463
- padding: 16px 10px;
464
- color: var(--gbd-dt-text-tertiary);
465
- font-size: 12px;
466
- text-align: center;
467
- }
468
-
469
- .word-scope .gbd-catalog__item {
470
- display: block;
471
- width: 100%;
472
- padding: 4px 8px;
473
- border: none;
474
- background: transparent;
475
- color: var(--gbd-dt-text);
476
- font-size: 13px;
477
- text-align: left;
478
- cursor: pointer;
479
- }
480
- .word-scope .gbd-catalog__item:hover {
481
- background: var(--gbd-dt-hover);
482
- }
483
- .word-scope .gbd-catalog__item.gbd-is-active {
484
- background: var(--gbd-dt-accent-soft);
485
- color: var(--gbd-dt-accent);
486
- }
487
-
488
- .word-scope .gbd-cmt-card {
489
- padding: 8px 10px;
490
- border-bottom: 1px solid var(--gbd-dt-border);
491
- cursor: pointer;
492
- }
493
- .word-scope .gbd-cmt-card.gbd-is-active {
494
- background: var(--gbd-dt-accent-soft);
495
- }
496
- .word-scope .gbd-cmt-card__meta {
497
- display: flex;
498
- align-items: center;
499
- gap: 6px;
500
- color: var(--gbd-dt-text-tertiary);
501
- font-size: 11px;
502
- }
503
- .word-scope .gbd-cmt-card__done {
504
- padding: 0 5px;
505
- border-radius: 3px;
506
- background: var(--gbd-dt-success-soft);
507
- color: var(--gbd-dt-success);
508
- }
509
- .word-scope .gbd-cmt-card__text {
510
- margin: 4px 0;
511
- font-size: 12px;
512
- line-height: 1.5;
513
- white-space: pre-wrap;
514
- word-break: break-word;
515
- }
516
- .word-scope .gbd-cmt-card__actions {
517
- display: flex;
518
- gap: 10px;
519
- }
520
-
521
- /* ==================== 浮层(菜单/气泡/色板) ==================== */
522
-
523
- .word-scope .gbd-popup {
524
- position: fixed;
525
- z-index: 1000;
526
- overflow-y: auto;
527
- border: 1px solid var(--gbd-dt-border);
528
- border-radius: 6px;
529
- background: var(--gbd-dt-surface);
530
- box-shadow: var(--gbd-dt-shadow-popup);
531
- color: var(--gbd-dt-text);
532
- }
533
-
534
- .word-scope .gbd-menu__list {
535
- min-width: 190px;
536
- padding: 5px;
537
- }
538
- .word-scope .gbd-menu__item {
539
- display: flex;
540
- align-items: center;
541
- gap: 8px;
542
- box-sizing: border-box;
543
- min-height: 30px;
544
- padding: 0 8px;
545
- border-radius: 4px;
546
- font-size: 13px;
547
- white-space: nowrap;
548
- cursor: pointer;
549
- }
550
- .word-scope .gbd-menu__item:hover {
551
- background: var(--gbd-dt-hover);
552
- }
553
- .word-scope .gbd-menu__item.gbd-is-disabled {
554
- color: var(--gbd-dt-text-disabled);
555
- cursor: default;
556
- }
557
- .word-scope .gbd-menu__item.gbd-is-disabled:hover {
558
- background: transparent;
559
- }
560
- .word-scope .gbd-menu__item.gbd-is-danger {
561
- color: var(--gbd-dt-danger);
562
- }
563
- .word-scope .gbd-menu__lead {
564
- width: 18px;
565
- display: inline-flex;
566
- align-items: center;
567
- justify-content: center;
568
- flex: none;
569
- color: var(--gbd-dt-text-secondary);
570
- }
571
- .word-scope .gbd-menu__lead svg {
572
- width: 15px;
573
- height: 15px;
574
- }
575
- .word-scope .gbd-menu__item.gbd-is-disabled .gbd-menu__lead {
576
- opacity: 0.55;
577
- }
578
- .word-scope .gbd-menu__dot {
579
- width: 12px;
580
- height: 12px;
581
- border-radius: 3px;
582
- border: 1px solid var(--gbd-dt-border-strong);
583
- }
584
- .word-scope .gbd-menu__label {
585
- flex: 1;
586
- }
587
- .word-scope .gbd-menu__shortcut {
588
- margin-left: 16px;
589
- color: var(--gbd-dt-text-tertiary);
590
- font-size: 11px;
591
- }
592
- .word-scope .gbd-menu__arrow {
593
- display: inline-flex;
594
- margin-left: 8px;
595
- color: var(--gbd-dt-text-tertiary);
596
- }
597
- .word-scope .gbd-menu__sep {
598
- height: 1px;
599
- margin: 4px 2px;
600
- background: var(--gbd-dt-border);
601
- }
602
- .word-scope .gbd-menu__input {
603
- display: inline-flex;
604
- align-items: center;
605
- gap: 3px;
606
- }
607
- .word-scope .gbd-menu__input input {
608
- width: 40px;
609
- height: 22px;
610
- padding: 0 4px;
611
- border: 1px solid var(--gbd-dt-border-strong);
612
- border-radius: 3px;
613
- background: var(--gbd-dt-bg);
614
- color: var(--gbd-dt-text);
615
- font-size: 12px;
616
- }
617
- .word-scope .gbd-menu__unit {
618
- color: var(--gbd-dt-text-tertiary);
619
- font-size: 11px;
620
- }
621
-
622
- .word-scope .gbd-prompt {
623
- width: 260px;
624
- padding: 10px;
625
- }
626
- .word-scope .gbd-prompt__title {
627
- margin-bottom: 6px;
628
- font-size: 13px;
629
- font-weight: 600;
630
- }
631
- .word-scope .gbd-prompt__input {
632
- width: 100%;
633
- height: 30px;
634
- padding: 0 8px;
635
- border: 1px solid var(--gbd-dt-border-strong);
636
- border-radius: 4px;
637
- background: var(--gbd-dt-bg);
638
- color: var(--gbd-dt-text);
639
- font-size: 13px;
640
- outline: none;
641
- }
642
- .word-scope .gbd-prompt__input:focus {
643
- border-color: var(--gbd-dt-accent);
644
- }
645
- .word-scope .gbd-prompt__actions {
646
- display: flex;
647
- justify-content: flex-end;
648
- gap: 8px;
649
- margin-top: 8px;
650
- }
651
-
652
- .word-scope .gbd-color {
653
- width: 232px;
654
- padding: 10px;
655
- }
656
- .word-scope .gbd-color__title {
657
- margin-bottom: 6px;
658
- font-size: 12px;
659
- color: var(--gbd-dt-text-secondary);
660
- }
661
- .word-scope .gbd-color__grid {
662
- display: grid;
663
- gap: 3px;
664
- }
665
- .word-scope .gbd-color__swatch {
666
- width: 18px;
667
- height: 18px;
668
- border: 1px solid var(--gbd-dt-border-strong);
669
- border-radius: 3px;
670
- cursor: pointer;
671
- }
672
- .word-scope .gbd-color__swatch.gbd-is-active {
673
- outline: 2px solid var(--gbd-dt-accent);
674
- outline-offset: 1px;
675
- }
676
- .word-scope .gbd-color__custom {
677
- display: flex;
678
- align-items: center;
679
- gap: 8px;
680
- margin-top: 8px;
681
- }
682
- .word-scope .gbd-color__hex {
683
- flex: 1;
684
- height: 26px;
685
- padding: 0 6px;
686
- border: 1px solid var(--gbd-dt-border-strong);
687
- border-radius: 4px;
688
- background: var(--gbd-dt-bg);
689
- color: var(--gbd-dt-text);
690
- font-size: 12px;
691
- }
692
- .word-scope .gbd-color__actions {
693
- display: flex;
694
- justify-content: flex-end;
695
- gap: 8px;
696
- margin-top: 8px;
697
- }
698
-
699
- .word-scope .gbd-popup--gbd-peek {
700
- max-width: 260px;
701
- }
702
-
703
- /* ==================== 模态对话框 ==================== */
704
-
705
- .word-scope .gbd-modal-overlay {
706
- position: fixed;
707
- inset: 0;
708
- z-index: 1200;
709
- display: flex;
710
- align-items: center;
711
- justify-content: center;
712
- background: rgba(0, 0, 0, 0.32);
713
- }
714
- .word-scope .gbd-modal {
715
- max-height: 86vh;
716
- display: flex;
717
- flex-direction: column;
718
- border: 1px solid var(--gbd-dt-border);
719
- border-radius: 8px;
720
- background: var(--gbd-dt-surface);
721
- box-shadow: var(--gbd-dt-shadow-window);
722
- }
723
- .word-scope .gbd-modal__head {
724
- display: flex;
725
- align-items: center;
726
- padding: 10px 14px;
727
- border-bottom: 1px solid var(--gbd-dt-border);
728
- }
729
- .word-scope .gbd-modal__title {
730
- flex: 1;
731
- font-size: 14px;
732
- font-weight: 600;
733
- }
734
- .word-scope .gbd-modal__close {
735
- border: none;
736
- background: none;
737
- color: var(--gbd-dt-text-secondary);
738
- font-size: 14px;
739
- cursor: pointer;
740
- }
741
- .word-scope .gbd-modal__body {
742
- flex: 1;
743
- overflow-y: auto;
744
- padding: 14px;
745
- }
746
- .word-scope .gbd-modal__foot {
747
- display: flex;
748
- justify-content: flex-end;
749
- gap: 8px;
750
- padding: 10px 14px;
751
- border-top: 1px solid var(--gbd-dt-border);
752
- }
753
-
754
- .word-scope .gbd-field-grid {
755
- display: grid;
756
- grid-template-columns: 1fr 1fr;
757
- gap: 8px 14px;
758
- }
759
- .word-scope .gbd-field {
760
- display: flex;
761
- align-items: center;
762
- gap: 8px;
763
- }
764
- .word-scope .gbd-field__label {
765
- width: 76px;
766
- color: var(--gbd-dt-text-secondary);
767
- font-size: 12px;
768
- }
769
- .word-scope .gbd-field .gbd-input {
770
- flex: 1;
771
- min-width: 0;
772
- }
773
- .word-scope .gbd-field-section {
774
- margin: 14px 0 8px;
775
- color: var(--gbd-dt-text-secondary);
776
- font-size: 12px;
777
- font-weight: 600;
778
- }
779
-
780
- /* ==================== 查找条 / 特殊字符 / 通知 ==================== */
781
-
782
- .word-scope .gbd-findbar {
783
- position: absolute;
784
- top: 8px;
785
- right: 16px;
786
- z-index: 6;
787
- display: flex;
788
- flex-direction: column;
789
- gap: 6px;
790
- padding: 6px 8px;
791
- border: 1px solid var(--gbd-dt-border);
792
- border-radius: 6px;
793
- background: var(--gbd-dt-surface);
794
- box-shadow: var(--gbd-dt-shadow-popup);
795
- }
796
- /* [坑] 上面的 display:flex 特异性高于 [hidden] 的 UA display:none:不补这条,查找条会常驻且 ✕ 关不上 */
797
- .word-scope .gbd-findbar[hidden] {
798
- display: none;
799
- }
800
- .word-scope .gbd-findbar__row {
801
- display: flex;
802
- align-items: center;
803
- gap: 6px;
804
- }
805
- .word-scope .gbd-findbar__row[hidden] {
806
- display: none;
807
- }
808
- .word-scope .gbd-findbar__input,
809
- .word-scope .gbd-findbar__replace {
810
- width: 130px;
811
- height: 26px;
812
- padding: 0 8px;
813
- border: 1px solid var(--gbd-dt-border-strong);
814
- border-radius: 4px;
815
- background: var(--gbd-dt-bg);
816
- color: var(--gbd-dt-text);
817
- font-size: 12px;
818
- outline: none;
819
- }
820
- .word-scope .gbd-findbar__count {
821
- color: var(--gbd-dt-text-secondary);
822
- font-size: 12px;
823
- }
824
- .word-scope .gbd-findbar__case {
825
- display: inline-flex;
826
- align-items: center;
827
- gap: 4px;
828
- color: var(--gbd-dt-text-secondary);
829
- font-size: 12px;
830
- white-space: nowrap;
831
- }
832
-
833
- .word-scope .word-chars {
834
- width: 288px;
835
- max-height: 320px;
836
- padding: 8px;
837
- overflow-y: auto;
838
- }
839
- .word-scope .wc-group + .wc-group {
840
- margin-top: 6px;
841
- }
842
- .word-scope .wc-label {
843
- margin-bottom: 2px;
844
- color: var(--gbd-dt-text-tertiary);
845
- font-size: 11px;
846
- }
847
- .word-scope .wc-grid {
848
- display: grid;
849
- grid-template-columns: repeat(8, 1fr);
850
- gap: 2px;
851
- }
852
- .word-scope .wc-item {
853
- height: 28px;
854
- border: none;
855
- border-radius: 2px;
856
- background: transparent;
857
- color: var(--gbd-dt-text);
858
- font-size: 14px;
859
- cursor: pointer;
860
- }
861
- .word-scope .wc-item:hover {
862
- background: var(--gbd-dt-hover);
863
- }
864
- .word-scope .word-chars-pop {
865
- position: absolute;
866
- top: 8px;
867
- right: 16px;
868
- z-index: 5;
869
- border: 1px solid var(--gbd-dt-border);
870
- border-radius: 6px;
871
- background: var(--gbd-dt-surface);
872
- box-shadow: var(--gbd-dt-shadow-popup);
873
- }
874
-
875
- .word-scope .gbdocx-notify-host {
876
- position: fixed;
877
- top: 14px;
878
- right: 14px;
879
- z-index: 2000;
880
- display: flex;
881
- flex-direction: column;
882
- gap: 8px;
883
- pointer-events: none;
884
- }
885
- .word-scope .gbdocx-notify {
886
- display: flex;
887
- align-items: center;
888
- gap: 8px;
889
- min-width: 200px;
890
- max-width: 360px;
891
- padding: 8px 12px;
892
- border: 1px solid var(--gbd-dt-border);
893
- border-radius: 6px;
894
- background: var(--gbd-dt-surface);
895
- box-shadow: var(--gbd-dt-shadow-popup);
896
- font-size: 13px;
897
- opacity: 0;
898
- transform: translateY(-8px);
899
- transition: opacity var(--gbd-dt-duration-normal) var(--gbd-dt-ease-out), transform var(--gbd-dt-duration-normal) var(--gbd-dt-ease-out);
900
- pointer-events: auto;
901
- cursor: pointer;
902
- }
903
- .word-scope .gbdocx-notify.gbd-is-in {
904
- opacity: 1;
905
- transform: translateY(0);
906
- }
907
- .word-scope .gbdocx-notify__badge {
908
- width: 18px;
909
- height: 18px;
910
- display: grid;
911
- place-items: center;
912
- border-radius: 50%;
913
- color: #fff;
914
- font-size: 12px;
915
- flex-shrink: 0;
916
- }
917
- .word-scope .gbdocx-notify--gbd-success .gbdocx-notify__badge { background: var(--gbd-dt-success); }
918
- .word-scope .gbdocx-notify--gbd-error .gbdocx-notify__badge { background: var(--gbd-dt-danger); }
919
- .word-scope .gbdocx-notify--gbd-warning .gbdocx-notify__badge { background: var(--gbd-dt-warning); }
920
- .word-scope .gbdocx-notify--gbd-info .gbdocx-notify__badge { background: var(--gbd-dt-accent); }
921
- .word-scope .gbdocx-notify__text {
922
- word-break: break-word;
923
- }
924
-
925
- /* ==================== 预览模式 ==================== */
926
- /* 只留文件头(标题/路径 + 退出预览)与正文;菜单、功能区、状态栏、侧栏等编辑界面全部收起 */
927
- .word-scope .word-app.gb-is-preview .gbo-head__actions,
928
- .word-scope .word-app.gb-is-preview .gbd-toolbar-host,
929
- .word-scope .word-app.gb-is-preview .gbd-statusbar-host,
930
- .word-scope .word-app.gb-is-preview .gbd-panel,
931
- .word-scope .word-app.gb-is-preview .gbd-findbar,
932
- .word-scope .word-app.gb-is-preview .word-chars-pop {
933
- display: none;
934
- }
935
- /* 预览档本体也是只读档,但退出按钮不能被只读档的 55% 透明度压暗 */
936
- .word-scope .word-app.gb-is-preview .word-head {
937
- opacity: 1;
938
- }
939
-
940
- /* ==================== 只读档 ==================== */
941
- /* 编辑控件已被 inert,压低视觉权重但不改底色;禁用态背景属状态反馈,不受静态背景约束 */
942
- .word-scope .word-app.gb-is-readonly:not(.gb-is-preview) .word-head,
943
- .word-scope .word-app.gb-is-readonly .gbd-toolbar-host { opacity: .55; }
944
-
945
- /* ==================== 打印 ==================== */
946
- @media print {
947
- .word-scope .gbd-menubar-host,
948
- .word-scope .word-head,
949
- .word-scope .gbd-toolbar-host,
950
- .word-scope .gbd-statusbar-host,
951
- .word-scope .gbd-panel,
952
- .word-scope .gbd-findbar,
953
- .word-scope .word-chars-pop,
954
- .word-scope .gbdocx-notify-host {
955
- display: none !important;
956
- }
957
- .word-scope .word-main,
958
- .word-scope .word-editor {
959
- display: block;
960
- background: #fff;
961
- }
962
- .word-scope .word-editor {
963
- zoom: 1 !important;
964
- }
965
- .word-scope .rich-edit-surface,
966
- .word-scope .re-scroll {
967
- height: auto !important;
968
- overflow: visible !important;
969
- }
970
- }
1
+ /* [文件] gbdocx·应用外壳样式 —— 编辑器宿主浮件层 + 菜单栏/工具栏/状态栏/面板/浮层/对话框/通知 */
2
+
3
+ /* ==================== 编辑器宿主(.rich-edit-surface:移植 EditorSurface.vue 的 scoped 样式) ==================== */
4
+
5
+ .word-scope .rich-edit-surface {
6
+ position: relative;
7
+ display: flex;
8
+ flex-direction: column;
9
+ width: 100%;
10
+ min-height: 0;
11
+ overflow: hidden;
12
+ }
13
+ .word-scope .rich-edit-surface.gbd-is-fill {
14
+ height: 100%;
15
+ }
16
+
17
+ .word-scope .rich-edit-surface .re-scroll {
18
+ position: relative;
19
+ flex: 1;
20
+ min-width: 0;
21
+ overflow-y: auto;
22
+ overflow-x: auto;
23
+ }
24
+
25
+ .word-scope .rich-edit-surface .re-backdrop-host {
26
+ position: absolute;
27
+ inset: 0;
28
+ pointer-events: none;
29
+ }
30
+
31
+ /* 浮件坐标探针(宽度由 overlayGeometry.PROBE_WIDTH 下发) */
32
+ .word-scope .rich-edit-surface .re-overlay-probe {
33
+ position: absolute;
34
+ top: 0;
35
+ left: 0;
36
+ height: 0;
37
+ pointer-events: none;
38
+ }
39
+
40
+ .word-scope .rich-edit-surface .re-content {
41
+ /* 显式压住纸面层(不依赖 word-panel.css 里的嵌套选择器解析结果)*/
42
+ position: relative;
43
+ z-index: 1;
44
+ flex: 1;
45
+ box-sizing: border-box;
46
+ min-height: var(--gbd-re-content-min-h, 100%);
47
+ width: var(--gbd-re-content-w, auto);
48
+ margin: var(--gbd-re-content-m, 0);
49
+ /* 正文随纸层一起下移,首行才落在纸的版心线上(纸层顶部留白见 --gbd-wd-sheet-top) */
50
+ margin-top: var(--gbd-wd-sheet-top, 0px);
51
+ padding: var(--gbd-re-content-pad, 14px 18px);
52
+ outline: none;
53
+ }
54
+
55
+ /* 纸面层只作背景,不接收指针(页眉页脚带自带 pointer-events:auto 例外) */
56
+ .word-scope .rich-edit-surface .word-sheets {
57
+ pointer-events: none;
58
+ z-index: 0;
59
+ }
60
+
61
+ .word-scope .rich-edit-surface .re-marquee {
62
+ position: absolute;
63
+ z-index: 8;
64
+ box-sizing: border-box;
65
+ border: 1px solid var(--gbd-dt-accent);
66
+ background: var(--gbd-dt-accent-soft);
67
+ pointer-events: none;
68
+ }
69
+
70
+
71
+ .word-scope .rich-edit-surface .re-table-layer {
72
+ --gbd-re-handle-thickness: 12px;
73
+ position: absolute;
74
+ inset: 0;
75
+ overflow: visible;
76
+ z-index: 7;
77
+ pointer-events: none;
78
+ }
79
+ .word-scope .rich-edit-surface .re-table-handles {
80
+ position: absolute;
81
+ inset: 0;
82
+ pointer-events: none;
83
+ }
84
+ .word-scope .rich-edit-surface .re-table-handle {
85
+ position: absolute;
86
+ display: flex;
87
+ align-items: center;
88
+ justify-content: center;
89
+ padding: 0;
90
+ border: none;
91
+ background: var(--gbd-dt-surface);
92
+ color: var(--gbd-dt-text-secondary);
93
+ font-size: 14px;
94
+ line-height: 1;
95
+ cursor: pointer;
96
+ pointer-events: auto;
97
+ transition: background-color var(--gbd-dt-duration-fast) ease, color var(--gbd-dt-duration-fast) ease;
98
+ }
99
+ .word-scope .rich-edit-surface .re-table-handle:hover {
100
+ background: var(--gbd-dt-accent-soft);
101
+ color: var(--gbd-dt-accent);
102
+ }
103
+ .word-scope .rich-edit-surface .re-table-handle.gbd-is-column {
104
+ width: var(--gbd-re-handle-thickness);
105
+ border-radius: 0 999px 999px 0;
106
+ }
107
+ .word-scope .rich-edit-surface .re-table-handle.gbd-is-row {
108
+ height: var(--gbd-re-handle-thickness);
109
+ border-radius: 0 0 999px 999px;
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
+
155
+ .word-scope .rich-edit-surface .re-table-select {
156
+ position: absolute;
157
+ box-sizing: border-box;
158
+ border: 1px solid var(--gbd-dt-accent);
159
+ background: var(--gbd-dt-accent-soft);
160
+ pointer-events: none;
161
+ }
162
+ .word-scope .rich-edit-surface .re-col-line {
163
+ position: absolute;
164
+ width: 6px;
165
+ margin-left: -3px;
166
+ pointer-events: none;
167
+ }
168
+ .word-scope .rich-edit-surface .re-col-line::after {
169
+ content: '';
170
+ position: absolute;
171
+ top: 0;
172
+ left: 2px;
173
+ width: 2px;
174
+ height: 100%;
175
+ background: var(--gbd-dt-accent-hover);
176
+ }
177
+
178
+ .word-scope .rich-edit-surface .re-resize-box {
179
+ position: absolute;
180
+ z-index: 6;
181
+ pointer-events: none;
182
+ }
183
+ .word-scope .rich-edit-surface .re-zoom-btn {
184
+ position: absolute;
185
+ top: -12px;
186
+ left: 50%;
187
+ width: 24px;
188
+ height: 24px;
189
+ padding: 0;
190
+ display: grid;
191
+ place-items: center;
192
+ transform: translateX(-50%);
193
+ border: 1px solid var(--gbd-dt-border-strong);
194
+ border-radius: 50%;
195
+ background: var(--gbd-dt-surface);
196
+ box-shadow: var(--gbd-dt-shadow-popup);
197
+ color: var(--gbd-dt-text-secondary);
198
+ cursor: pointer;
199
+ pointer-events: auto;
200
+ }
201
+ .word-scope .rich-edit-surface .re-zoom-btn:hover {
202
+ border-color: var(--gbd-dt-accent);
203
+ background: var(--gbd-dt-accent-soft);
204
+ color: var(--gbd-dt-accent);
205
+ }
206
+ .word-scope .rich-edit-surface .re-resize-handle {
207
+ position: absolute;
208
+ width: 10px;
209
+ height: 10px;
210
+ box-sizing: border-box;
211
+ border: 2px solid var(--gbd-dt-surface);
212
+ border-radius: 50%;
213
+ background: var(--gbd-dt-accent);
214
+ box-shadow: 0 0 0 1px var(--gbd-dt-border-strong);
215
+ pointer-events: auto;
216
+ cursor: nwse-resize;
217
+ }
218
+ .word-scope .rich-edit-surface .re-resize-handle.gbd-is-top-left { left: -5px; top: -5px; }
219
+ .word-scope .rich-edit-surface .re-resize-handle.gbd-is-top-right { right: -5px; top: -5px; cursor: nesw-resize; }
220
+ .word-scope .rich-edit-surface .re-resize-handle.gbd-is-bottom-left { left: -5px; bottom: -5px; cursor: nesw-resize; }
221
+ .word-scope .rich-edit-surface .re-resize-handle.gbd-is-bottom-right { right: -5px; bottom: -5px; }
222
+
223
+ .word-scope .rich-edit-surface .re-image-viewer {
224
+ position: fixed;
225
+ inset: 0;
226
+ z-index: 400;
227
+ display: flex;
228
+ align-items: center;
229
+ justify-content: center;
230
+ background: var(--gbd-dt-media-overlay);
231
+ cursor: zoom-out;
232
+ }
233
+ /* [坑] 上面的 display:flex 特异性高于 [hidden] 的 UA display:none:不补这条,
234
+ hidden 的图片查看器会常驻成一层深色遮罩(并挡住编辑区点击) */
235
+ .word-scope .rich-edit-surface .re-image-viewer[hidden] {
236
+ display: none;
237
+ }
238
+ .word-scope .rich-edit-surface .re-image-viewer img {
239
+ max-width: 92%;
240
+ max-height: 92%;
241
+ object-fit: contain;
242
+ }
243
+
244
+ /* ==================== 应用外壳 ==================== */
245
+ /* [设计] 菜单栏 / 文档头 / 功能区 / 状态栏的视觉统一由 gbofficeui 提供;
246
+ 本文件只保留应用骨架布局与正文区样式,不写第二份顶栏外观。 */
247
+
248
+ .word-scope .word-app {
249
+ display: flex;
250
+ flex-direction: column;
251
+ height: 100%;
252
+ min-height: 0;
253
+ }
254
+
255
+ /* 页面内全屏态:整个 Word 应用铺满视口(文档头留着,恢复按钮在同一位置) */
256
+ .word-scope .word-app.gbd-is-pagefullscreen {
257
+ position: fixed;
258
+ inset: 0;
259
+ z-index: 500;
260
+ width: 100%;
261
+ height: 100%;
262
+ background: var(--gbd-dt-bg);
263
+ }
264
+
265
+ .word-scope .word-head .word-head__dirty {
266
+ color: var(--gbd-dt-warning);
267
+ }
268
+
269
+ .word-scope .word-main {
270
+ display: flex;
271
+ flex: 1;
272
+ min-width: 0;
273
+ min-height: 0;
274
+ }
275
+ .word-scope .word-editor {
276
+ position: relative;
277
+ display: flex;
278
+ flex: 1;
279
+ min-width: 0;
280
+ min-height: 0;
281
+ }
282
+ .word-scope .word-editor-mount {
283
+ display: flex;
284
+ flex: 1;
285
+ min-width: 0;
286
+ min-height: 0;
287
+ }
288
+
289
+ /* ==================== 按钮 ==================== */
290
+
291
+ .word-scope .gbd-btn {
292
+ padding: 4px 12px;
293
+ border: 1px solid var(--gbd-dt-border-strong);
294
+ border-radius: 6px;
295
+ background: var(--gbd-dt-bg);
296
+ color: var(--gbd-dt-text);
297
+ font-size: 13px;
298
+ cursor: pointer;
299
+ transition: background-color var(--gbd-dt-duration-fast) ease, border-color var(--gbd-dt-duration-fast) ease;
300
+ }
301
+ .word-scope .gbd-btn:hover {
302
+ border-color: var(--gbd-dt-accent);
303
+ background: var(--gbd-dt-accent-soft);
304
+ }
305
+ .word-scope .gbd-btn--gbd-primary {
306
+ border-color: var(--gbd-dt-accent);
307
+ background: var(--gbd-dt-accent);
308
+ color: var(--gbd-dt-on-accent);
309
+ }
310
+ .word-scope .gbd-btn--gbd-primary:hover {
311
+ background: var(--gbd-dt-accent-hover);
312
+ }
313
+ .word-scope .gbd-linkbtn {
314
+ padding: 0;
315
+ border: none;
316
+ background: none;
317
+ color: var(--gbd-dt-accent);
318
+ font-size: 12px;
319
+ cursor: pointer;
320
+ }
321
+ .word-scope .gbd-linkbtn--gbd-danger {
322
+ color: var(--gbd-dt-danger);
323
+ }
324
+ .word-scope .gbd-iconbtn {
325
+ width: 24px;
326
+ height: 24px;
327
+ display: grid;
328
+ place-items: center;
329
+ border: 1px solid transparent;
330
+ border-radius: 4px;
331
+ background: transparent;
332
+ color: var(--gbd-dt-text-secondary);
333
+ cursor: pointer;
334
+ }
335
+ .word-scope .gbd-iconbtn:hover {
336
+ background: var(--gbd-dt-hover);
337
+ }
338
+
339
+ .word-scope .gbd-input {
340
+ height: 28px;
341
+ padding: 0 8px;
342
+ border: 1px solid var(--gbd-dt-border-strong);
343
+ border-radius: 4px;
344
+ background: var(--gbd-dt-bg);
345
+ color: var(--gbd-dt-text);
346
+ font-size: 13px;
347
+ outline: none;
348
+ }
349
+ .word-scope .gbd-input:focus {
350
+ border-color: var(--gbd-dt-accent);
351
+ }
352
+
353
+ /* ==================== 下拉选择 ==================== */
354
+ /* 注:菜单栏 / 功能区内的尺寸与状态由 gbofficeui 统一,这里只留独立分发时的基础外观 */
355
+
356
+ .word-scope .gbd-select {
357
+ display: inline-flex;
358
+ align-items: center;
359
+ gap: 4px;
360
+ height: 26px;
361
+ padding: 0 6px;
362
+ border: 1px solid var(--gbd-dt-border-strong);
363
+ border-radius: 4px;
364
+ background: var(--gbd-dt-bg);
365
+ color: var(--gbd-dt-text);
366
+ font-size: 12px;
367
+ cursor: pointer;
368
+ }
369
+ .word-scope .gbd-select__label {
370
+ flex: 1;
371
+ overflow: hidden;
372
+ text-overflow: ellipsis;
373
+ white-space: nowrap;
374
+ /* button 的 UA 默认 text-align:center 会继承给 label,WPS 的字体框是左对齐 */
375
+ text-align: left;
376
+ }
377
+ .word-scope .gbd-select__caret {
378
+ color: var(--gbd-dt-text-tertiary);
379
+ }
380
+
381
+
382
+ /* ==================== 选项卡栏(Ribbon) ==================== */
383
+ /* 外壳 / 选项卡 / 分组 / 按钮的视觉由 gbofficeui/styles/office-chrome.css 统一,
384
+ 本文件只保留 docx 专属的样式卡片(.gbd-rstyle)。 */
385
+
386
+ /* 样式卡片:样式名按自身字号预览(WPS 样式库口径),当前段落样式描边点亮 */
387
+ .word-scope .gbd-rstyle {
388
+ width: 56px;
389
+ height: 52px;
390
+ display: flex;
391
+ align-items: center;
392
+ justify-content: center;
393
+ padding: 2px;
394
+ border: 1px solid var(--gbd-dt-border-strong);
395
+ border-radius: 6px;
396
+ background: var(--gbd-dt-bg);
397
+ color: var(--gbd-dt-text);
398
+ cursor: pointer;
399
+ overflow: hidden;
400
+ transition: background-color var(--gbd-dt-duration-fast) ease, border-color var(--gbd-dt-duration-fast) ease;
401
+ }
402
+ .word-scope .gbd-rstyle:hover {
403
+ background: var(--gbd-dt-hover);
404
+ border-color: var(--gbd-dt-accent);
405
+ }
406
+ .word-scope .gbd-rstyle:focus-visible {
407
+ outline: 2px solid var(--gbd-dt-accent);
408
+ outline-offset: 1px;
409
+ }
410
+ .word-scope .gbd-rstyle.gbd-is-active {
411
+ border-color: var(--gbd-dt-accent);
412
+ background: var(--gbd-dt-accent-soft);
413
+ }
414
+ .word-scope .gbd-rstyle__preview {
415
+ font-size: 13px;
416
+ line-height: 1.2;
417
+ text-align: center;
418
+ white-space: nowrap;
419
+ color: var(--gbd-dt-text);
420
+ }
421
+ .word-scope .gbd-rstyle__preview--h1 {
422
+ font-size: 16px;
423
+ font-weight: 700;
424
+ }
425
+ .word-scope .gbd-rstyle__preview--h2 {
426
+ font-size: 15px;
427
+ font-weight: 700;
428
+ }
429
+ .word-scope .gbd-rstyle__preview--h3 {
430
+ font-size: 14px;
431
+ font-weight: 600;
432
+ }
433
+ .word-scope .gbd-rstyle.gbd-is-active .gbd-rstyle__preview {
434
+ color: var(--gbd-dt-accent);
435
+ }
436
+
437
+ /* ==================== 侧栏面板 ==================== */
438
+
439
+ .word-scope .gbd-panel {
440
+ display: flex;
441
+ flex-direction: column;
442
+ width: 250px;
443
+ min-height: 0;
444
+ border-right: 1px solid var(--gbd-dt-border);
445
+ background: var(--gbd-dt-bg);
446
+ }
447
+ .word-scope .gbd-comments {
448
+ border-right: none;
449
+ border-left: 1px solid var(--gbd-dt-border);
450
+ }
451
+ .word-scope .gbd-panel__title {
452
+ padding: 6px 10px;
453
+ border-bottom: 1px solid var(--gbd-dt-border);
454
+ color: var(--gbd-dt-text-secondary);
455
+ font-size: 12px;
456
+ }
457
+ .word-scope .gbd-panel__body {
458
+ flex: 1;
459
+ min-height: 0;
460
+ overflow-y: auto;
461
+ }
462
+ .word-scope .gbd-panel__empty {
463
+ padding: 16px 10px;
464
+ color: var(--gbd-dt-text-tertiary);
465
+ font-size: 12px;
466
+ text-align: center;
467
+ }
468
+
469
+ .word-scope .gbd-catalog__item {
470
+ display: block;
471
+ width: 100%;
472
+ padding: 4px 8px;
473
+ border: none;
474
+ background: transparent;
475
+ color: var(--gbd-dt-text);
476
+ font-size: 13px;
477
+ text-align: left;
478
+ cursor: pointer;
479
+ }
480
+ .word-scope .gbd-catalog__item:hover {
481
+ background: var(--gbd-dt-hover);
482
+ }
483
+ .word-scope .gbd-catalog__item.gbd-is-active {
484
+ background: var(--gbd-dt-accent-soft);
485
+ color: var(--gbd-dt-accent);
486
+ }
487
+
488
+ .word-scope .gbd-cmt-card {
489
+ padding: 8px 10px;
490
+ border-bottom: 1px solid var(--gbd-dt-border);
491
+ cursor: pointer;
492
+ }
493
+ .word-scope .gbd-cmt-card.gbd-is-active {
494
+ background: var(--gbd-dt-accent-soft);
495
+ }
496
+ .word-scope .gbd-cmt-card__meta {
497
+ display: flex;
498
+ align-items: center;
499
+ gap: 6px;
500
+ color: var(--gbd-dt-text-tertiary);
501
+ font-size: 11px;
502
+ }
503
+ .word-scope .gbd-cmt-card__done {
504
+ padding: 0 5px;
505
+ border-radius: 3px;
506
+ background: var(--gbd-dt-success-soft);
507
+ color: var(--gbd-dt-success);
508
+ }
509
+ .word-scope .gbd-cmt-card__text {
510
+ margin: 4px 0;
511
+ font-size: 12px;
512
+ line-height: 1.5;
513
+ white-space: pre-wrap;
514
+ word-break: break-word;
515
+ }
516
+ .word-scope .gbd-cmt-card__actions {
517
+ display: flex;
518
+ gap: 10px;
519
+ }
520
+
521
+ /* ==================== 浮层(菜单/气泡/色板) ==================== */
522
+
523
+ .word-scope .gbd-popup {
524
+ position: fixed;
525
+ z-index: 1000;
526
+ overflow-y: auto;
527
+ border: 1px solid var(--gbd-dt-border);
528
+ border-radius: 6px;
529
+ background: var(--gbd-dt-surface);
530
+ box-shadow: var(--gbd-dt-shadow-popup);
531
+ color: var(--gbd-dt-text);
532
+ }
533
+
534
+ .word-scope .gbd-menu__list {
535
+ min-width: 190px;
536
+ padding: 5px;
537
+ }
538
+ .word-scope .gbd-menu__item {
539
+ display: flex;
540
+ align-items: center;
541
+ gap: 8px;
542
+ box-sizing: border-box;
543
+ min-height: 30px;
544
+ padding: 0 8px;
545
+ border-radius: 4px;
546
+ font-size: 13px;
547
+ white-space: nowrap;
548
+ cursor: pointer;
549
+ }
550
+ .word-scope .gbd-menu__item:hover {
551
+ background: var(--gbd-dt-hover);
552
+ }
553
+ .word-scope .gbd-menu__item.gbd-is-disabled {
554
+ color: var(--gbd-dt-text-disabled);
555
+ cursor: default;
556
+ }
557
+ .word-scope .gbd-menu__item.gbd-is-disabled:hover {
558
+ background: transparent;
559
+ }
560
+ .word-scope .gbd-menu__item.gbd-is-danger {
561
+ color: var(--gbd-dt-danger);
562
+ }
563
+ .word-scope .gbd-menu__lead {
564
+ width: 18px;
565
+ display: inline-flex;
566
+ align-items: center;
567
+ justify-content: center;
568
+ flex: none;
569
+ color: var(--gbd-dt-text-secondary);
570
+ }
571
+ .word-scope .gbd-menu__lead svg {
572
+ width: 15px;
573
+ height: 15px;
574
+ }
575
+ .word-scope .gbd-menu__item.gbd-is-disabled .gbd-menu__lead {
576
+ opacity: 0.55;
577
+ }
578
+ .word-scope .gbd-menu__dot {
579
+ width: 12px;
580
+ height: 12px;
581
+ border-radius: 3px;
582
+ border: 1px solid var(--gbd-dt-border-strong);
583
+ }
584
+ .word-scope .gbd-menu__label {
585
+ flex: 1;
586
+ }
587
+ .word-scope .gbd-menu__shortcut {
588
+ margin-left: 16px;
589
+ color: var(--gbd-dt-text-tertiary);
590
+ font-size: 11px;
591
+ }
592
+ .word-scope .gbd-menu__arrow {
593
+ display: inline-flex;
594
+ margin-left: 8px;
595
+ color: var(--gbd-dt-text-tertiary);
596
+ }
597
+ .word-scope .gbd-menu__sep {
598
+ height: 1px;
599
+ margin: 4px 2px;
600
+ background: var(--gbd-dt-border);
601
+ }
602
+ .word-scope .gbd-menu__input {
603
+ display: inline-flex;
604
+ align-items: center;
605
+ gap: 3px;
606
+ }
607
+ .word-scope .gbd-menu__input input {
608
+ width: 40px;
609
+ height: 22px;
610
+ padding: 0 4px;
611
+ border: 1px solid var(--gbd-dt-border-strong);
612
+ border-radius: 3px;
613
+ background: var(--gbd-dt-bg);
614
+ color: var(--gbd-dt-text);
615
+ font-size: 12px;
616
+ }
617
+ .word-scope .gbd-menu__unit {
618
+ color: var(--gbd-dt-text-tertiary);
619
+ font-size: 11px;
620
+ }
621
+
622
+ .word-scope .gbd-prompt {
623
+ width: 260px;
624
+ padding: 10px;
625
+ }
626
+ .word-scope .gbd-prompt__title {
627
+ margin-bottom: 6px;
628
+ font-size: 13px;
629
+ font-weight: 600;
630
+ }
631
+ .word-scope .gbd-prompt__input {
632
+ width: 100%;
633
+ height: 30px;
634
+ padding: 0 8px;
635
+ border: 1px solid var(--gbd-dt-border-strong);
636
+ border-radius: 4px;
637
+ background: var(--gbd-dt-bg);
638
+ color: var(--gbd-dt-text);
639
+ font-size: 13px;
640
+ outline: none;
641
+ }
642
+ .word-scope .gbd-prompt__input:focus {
643
+ border-color: var(--gbd-dt-accent);
644
+ }
645
+ .word-scope .gbd-prompt__actions {
646
+ display: flex;
647
+ justify-content: flex-end;
648
+ gap: 8px;
649
+ margin-top: 8px;
650
+ }
651
+
652
+ .word-scope .gbd-color {
653
+ width: 232px;
654
+ padding: 10px;
655
+ }
656
+ .word-scope .gbd-color__title {
657
+ margin-bottom: 6px;
658
+ font-size: 12px;
659
+ color: var(--gbd-dt-text-secondary);
660
+ }
661
+ .word-scope .gbd-color__grid {
662
+ display: grid;
663
+ gap: 3px;
664
+ }
665
+ .word-scope .gbd-color__swatch {
666
+ width: 18px;
667
+ height: 18px;
668
+ border: 1px solid var(--gbd-dt-border-strong);
669
+ border-radius: 3px;
670
+ cursor: pointer;
671
+ }
672
+ .word-scope .gbd-color__swatch.gbd-is-active {
673
+ outline: 2px solid var(--gbd-dt-accent);
674
+ outline-offset: 1px;
675
+ }
676
+ .word-scope .gbd-color__custom {
677
+ display: flex;
678
+ align-items: center;
679
+ gap: 8px;
680
+ margin-top: 8px;
681
+ }
682
+ .word-scope .gbd-color__hex {
683
+ flex: 1;
684
+ height: 26px;
685
+ padding: 0 6px;
686
+ border: 1px solid var(--gbd-dt-border-strong);
687
+ border-radius: 4px;
688
+ background: var(--gbd-dt-bg);
689
+ color: var(--gbd-dt-text);
690
+ font-size: 12px;
691
+ }
692
+ .word-scope .gbd-color__actions {
693
+ display: flex;
694
+ justify-content: flex-end;
695
+ gap: 8px;
696
+ margin-top: 8px;
697
+ }
698
+
699
+ .word-scope .gbd-popup--gbd-peek {
700
+ max-width: 260px;
701
+ }
702
+
703
+ /* ==================== 模态对话框 ==================== */
704
+
705
+ .word-scope .gbd-modal-overlay {
706
+ position: fixed;
707
+ inset: 0;
708
+ z-index: 1200;
709
+ display: flex;
710
+ align-items: center;
711
+ justify-content: center;
712
+ background: rgba(0, 0, 0, 0.32);
713
+ }
714
+ .word-scope .gbd-modal {
715
+ max-height: 86vh;
716
+ display: flex;
717
+ flex-direction: column;
718
+ border: 1px solid var(--gbd-dt-border);
719
+ border-radius: 8px;
720
+ background: var(--gbd-dt-surface);
721
+ box-shadow: var(--gbd-dt-shadow-window);
722
+ }
723
+ .word-scope .gbd-modal__head {
724
+ display: flex;
725
+ align-items: center;
726
+ padding: 10px 14px;
727
+ border-bottom: 1px solid var(--gbd-dt-border);
728
+ }
729
+ .word-scope .gbd-modal__title {
730
+ flex: 1;
731
+ font-size: 14px;
732
+ font-weight: 600;
733
+ }
734
+ .word-scope .gbd-modal__close {
735
+ border: none;
736
+ background: none;
737
+ color: var(--gbd-dt-text-secondary);
738
+ font-size: 14px;
739
+ cursor: pointer;
740
+ }
741
+ .word-scope .gbd-modal__body {
742
+ flex: 1;
743
+ overflow-y: auto;
744
+ padding: 14px;
745
+ }
746
+ .word-scope .gbd-modal__foot {
747
+ display: flex;
748
+ justify-content: flex-end;
749
+ gap: 8px;
750
+ padding: 10px 14px;
751
+ border-top: 1px solid var(--gbd-dt-border);
752
+ }
753
+
754
+ .word-scope .gbd-field-grid {
755
+ display: grid;
756
+ grid-template-columns: 1fr 1fr;
757
+ gap: 8px 14px;
758
+ }
759
+ .word-scope .gbd-field {
760
+ display: flex;
761
+ align-items: center;
762
+ gap: 8px;
763
+ }
764
+ .word-scope .gbd-field__label {
765
+ width: 76px;
766
+ color: var(--gbd-dt-text-secondary);
767
+ font-size: 12px;
768
+ }
769
+ .word-scope .gbd-field .gbd-input {
770
+ flex: 1;
771
+ min-width: 0;
772
+ }
773
+ .word-scope .gbd-field-section {
774
+ margin: 14px 0 8px;
775
+ color: var(--gbd-dt-text-secondary);
776
+ font-size: 12px;
777
+ font-weight: 600;
778
+ }
779
+
780
+ /* ==================== 查找条 / 特殊字符 / 通知 ==================== */
781
+
782
+ .word-scope .gbd-findbar {
783
+ position: absolute;
784
+ top: 8px;
785
+ right: 16px;
786
+ z-index: 6;
787
+ display: flex;
788
+ flex-direction: column;
789
+ gap: 6px;
790
+ padding: 6px 8px;
791
+ border: 1px solid var(--gbd-dt-border);
792
+ border-radius: 6px;
793
+ background: var(--gbd-dt-surface);
794
+ box-shadow: var(--gbd-dt-shadow-popup);
795
+ }
796
+ /* [坑] 上面的 display:flex 特异性高于 [hidden] 的 UA display:none:不补这条,查找条会常驻且 ✕ 关不上 */
797
+ .word-scope .gbd-findbar[hidden] {
798
+ display: none;
799
+ }
800
+ .word-scope .gbd-findbar__row {
801
+ display: flex;
802
+ align-items: center;
803
+ gap: 6px;
804
+ }
805
+ .word-scope .gbd-findbar__row[hidden] {
806
+ display: none;
807
+ }
808
+ .word-scope .gbd-findbar__input,
809
+ .word-scope .gbd-findbar__replace {
810
+ width: 130px;
811
+ height: 26px;
812
+ padding: 0 8px;
813
+ border: 1px solid var(--gbd-dt-border-strong);
814
+ border-radius: 4px;
815
+ background: var(--gbd-dt-bg);
816
+ color: var(--gbd-dt-text);
817
+ font-size: 12px;
818
+ outline: none;
819
+ }
820
+ .word-scope .gbd-findbar__count {
821
+ color: var(--gbd-dt-text-secondary);
822
+ font-size: 12px;
823
+ }
824
+ .word-scope .gbd-findbar__case {
825
+ display: inline-flex;
826
+ align-items: center;
827
+ gap: 4px;
828
+ color: var(--gbd-dt-text-secondary);
829
+ font-size: 12px;
830
+ white-space: nowrap;
831
+ }
832
+
833
+ .word-scope .word-chars {
834
+ width: 288px;
835
+ max-height: 320px;
836
+ padding: 8px;
837
+ overflow-y: auto;
838
+ }
839
+ .word-scope .wc-group + .wc-group {
840
+ margin-top: 6px;
841
+ }
842
+ .word-scope .wc-label {
843
+ margin-bottom: 2px;
844
+ color: var(--gbd-dt-text-tertiary);
845
+ font-size: 11px;
846
+ }
847
+ .word-scope .wc-grid {
848
+ display: grid;
849
+ grid-template-columns: repeat(8, 1fr);
850
+ gap: 2px;
851
+ }
852
+ .word-scope .wc-item {
853
+ height: 28px;
854
+ border: none;
855
+ border-radius: 2px;
856
+ background: transparent;
857
+ color: var(--gbd-dt-text);
858
+ font-size: 14px;
859
+ cursor: pointer;
860
+ }
861
+ .word-scope .wc-item:hover {
862
+ background: var(--gbd-dt-hover);
863
+ }
864
+ .word-scope .word-chars-pop {
865
+ position: absolute;
866
+ top: 8px;
867
+ right: 16px;
868
+ z-index: 5;
869
+ border: 1px solid var(--gbd-dt-border);
870
+ border-radius: 6px;
871
+ background: var(--gbd-dt-surface);
872
+ box-shadow: var(--gbd-dt-shadow-popup);
873
+ }
874
+
875
+ .word-scope .gbdocx-notify-host {
876
+ position: fixed;
877
+ top: 14px;
878
+ right: 14px;
879
+ z-index: 2000;
880
+ display: flex;
881
+ flex-direction: column;
882
+ gap: 8px;
883
+ pointer-events: none;
884
+ }
885
+ .word-scope .gbdocx-notify {
886
+ display: flex;
887
+ align-items: center;
888
+ gap: 8px;
889
+ min-width: 200px;
890
+ max-width: 360px;
891
+ padding: 8px 12px;
892
+ border: 1px solid var(--gbd-dt-border);
893
+ border-radius: 6px;
894
+ background: var(--gbd-dt-surface);
895
+ box-shadow: var(--gbd-dt-shadow-popup);
896
+ font-size: 13px;
897
+ opacity: 0;
898
+ transform: translateY(-8px);
899
+ transition: opacity var(--gbd-dt-duration-normal) var(--gbd-dt-ease-out), transform var(--gbd-dt-duration-normal) var(--gbd-dt-ease-out);
900
+ pointer-events: auto;
901
+ cursor: pointer;
902
+ }
903
+ .word-scope .gbdocx-notify.gbd-is-in {
904
+ opacity: 1;
905
+ transform: translateY(0);
906
+ }
907
+ .word-scope .gbdocx-notify__badge {
908
+ width: 18px;
909
+ height: 18px;
910
+ display: grid;
911
+ place-items: center;
912
+ border-radius: 50%;
913
+ color: #fff;
914
+ font-size: 12px;
915
+ flex-shrink: 0;
916
+ }
917
+ .word-scope .gbdocx-notify--gbd-success .gbdocx-notify__badge { background: var(--gbd-dt-success); }
918
+ .word-scope .gbdocx-notify--gbd-error .gbdocx-notify__badge { background: var(--gbd-dt-danger); }
919
+ .word-scope .gbdocx-notify--gbd-warning .gbdocx-notify__badge { background: var(--gbd-dt-warning); }
920
+ .word-scope .gbdocx-notify--gbd-info .gbdocx-notify__badge { background: var(--gbd-dt-accent); }
921
+ .word-scope .gbdocx-notify__text {
922
+ word-break: break-word;
923
+ }
924
+
925
+ /* ==================== 预览模式 ==================== */
926
+ /* 只留文件头(标题/路径 + 退出预览)与正文;菜单、功能区、状态栏、侧栏等编辑界面全部收起 */
927
+ .word-scope .word-app.gb-is-preview .gbo-head__actions,
928
+ .word-scope .word-app.gb-is-preview .gbd-toolbar-host,
929
+ .word-scope .word-app.gb-is-preview .gbd-statusbar-host,
930
+ .word-scope .word-app.gb-is-preview .gbd-panel,
931
+ .word-scope .word-app.gb-is-preview .gbd-findbar,
932
+ .word-scope .word-app.gb-is-preview .word-chars-pop {
933
+ display: none;
934
+ }
935
+ /* 预览档本体也是只读档,但退出按钮不能被只读档的 55% 透明度压暗 */
936
+ .word-scope .word-app.gb-is-preview .word-head {
937
+ opacity: 1;
938
+ }
939
+
940
+ /* ==================== 只读档 ==================== */
941
+ /* 编辑控件已被 inert,压低视觉权重但不改底色;禁用态背景属状态反馈,不受静态背景约束 */
942
+ .word-scope .word-app.gb-is-readonly:not(.gb-is-preview) .word-head,
943
+ .word-scope .word-app.gb-is-readonly .gbd-toolbar-host { opacity: .55; }
944
+
945
+ /* ==================== 打印 ==================== */
946
+ @media print {
947
+ .word-scope .gbd-menubar-host,
948
+ .word-scope .word-head,
949
+ .word-scope .gbd-toolbar-host,
950
+ .word-scope .gbd-statusbar-host,
951
+ .word-scope .gbd-panel,
952
+ .word-scope .gbd-findbar,
953
+ .word-scope .word-chars-pop,
954
+ .word-scope .gbdocx-notify-host {
955
+ display: none !important;
956
+ }
957
+ .word-scope .word-main,
958
+ .word-scope .word-editor {
959
+ display: block;
960
+ background: #fff;
961
+ }
962
+ .word-scope .word-editor {
963
+ zoom: 1 !important;
964
+ }
965
+ .word-scope .rich-edit-surface,
966
+ .word-scope .re-scroll {
967
+ height: auto !important;
968
+ overflow: visible !important;
969
+ }
970
+ }