@einfach-excel/spreadsheet-ui-styles 0.0.0-stage → 0.2.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.
Files changed (73) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +37 -2
  3. package/features/comment-thread.css +169 -0
  4. package/features/comment-thread.css.d.ts +2 -0
  5. package/features/conditional-format-dialog.css +254 -0
  6. package/features/conditional-format-dialog.css.d.ts +7 -0
  7. package/features/conditional-format-fields.css +10 -0
  8. package/features/conditional-format-fields.css.d.ts +2 -0
  9. package/features/data-validation-dialog.css +197 -0
  10. package/features/data-validation-dialog.css.d.ts +7 -0
  11. package/features/filter-dropdown.css +177 -0
  12. package/features/filter-dropdown.css.d.ts +2 -0
  13. package/features/find-replace-actions.css +13 -0
  14. package/features/find-replace-actions.css.d.ts +2 -0
  15. package/features/find-replace-dialog.css +147 -0
  16. package/features/find-replace-dialog.css.d.ts +2 -0
  17. package/features/find-replace-status-messages.css +19 -0
  18. package/features/find-replace-status-messages.css.d.ts +2 -0
  19. package/features/format-cells-dialog.css +296 -0
  20. package/features/format-cells-dialog.css.d.ts +2 -0
  21. package/features/format-cells-panels.css +154 -0
  22. package/features/format-cells-panels.css.d.ts +2 -0
  23. package/features/go-to-dialog.css +205 -0
  24. package/features/go-to-dialog.css.d.ts +2 -0
  25. package/features/menu-help-dialog.css +82 -0
  26. package/features/name-manager-dialog.css +276 -0
  27. package/features/number-format-dialog.css +147 -0
  28. package/features/number-format-dialog.css.d.ts +2 -0
  29. package/features/page-setup-dialog.css +167 -0
  30. package/features/page-setup-dialog.css.d.ts +3 -0
  31. package/features/paste-special-dialog.css +126 -0
  32. package/features/paste-special-dialog.css.d.ts +7 -0
  33. package/features/print-preview-dialog.css +197 -0
  34. package/features/print-preview-dialog.css.d.ts +3 -0
  35. package/features/protection-unlock-dialog.css +127 -0
  36. package/features/remove-duplicates-dialog.css +165 -0
  37. package/features/remove-duplicates-dialog.css.d.ts +7 -0
  38. package/features/sheet-tab-delete-dialog.css +64 -0
  39. package/features/sheet-tab-delete-dialog.css.d.ts +3 -0
  40. package/features/sort-confirmation-dialog.css +157 -0
  41. package/features/sort-confirmation-dialog.css.d.ts +2 -0
  42. package/features/text-to-columns-dialog.css +246 -0
  43. package/features/text-to-columns-dialog.css.d.ts +2 -0
  44. package/features/toolbar-shell.css +46 -0
  45. package/features/toolbar-shell.css.d.ts +2 -0
  46. package/package.json +40 -3
  47. package/styles/button-states.css +45 -0
  48. package/styles/chrome-tokens.css +124 -0
  49. package/styles/demo-header.css +23 -0
  50. package/styles/demo-two-column.css +115 -0
  51. package/styles/diagnostics.css +127 -0
  52. package/styles/dialog-skin.css +143 -0
  53. package/styles/formula-autocomplete.css +87 -0
  54. package/styles/formula-bar-row.css +51 -0
  55. package/styles/grid-cells.css +254 -0
  56. package/styles/grid-frame.css +268 -0
  57. package/styles/grid-headers.css +99 -0
  58. package/styles/grid-overlays.css +160 -0
  59. package/styles/help-overlay.css +67 -0
  60. package/styles/history-panel.css +127 -0
  61. package/styles/index.css +26 -0
  62. package/styles/locked-edit-feedback.css +45 -0
  63. package/styles/marching-ants.css +18 -0
  64. package/styles/menu-bar.css +97 -0
  65. package/styles/name-box.css +89 -0
  66. package/styles/presence-overlay.css +36 -0
  67. package/styles/shared-context-menu.css +50 -0
  68. package/styles/shared-format-toolbar.css +82 -0
  69. package/styles/shared-sheet-tabs.css +138 -0
  70. package/styles/sheet-tabs.css +98 -0
  71. package/styles/status-bar.css +161 -0
  72. package/styles/toolbar-popovers.css +278 -0
  73. package/styles/toolbar.css +213 -0
@@ -0,0 +1,161 @@
1
+ /* === C. Bottom chrome — status bar sections + sheet tabs =============== */
2
+
3
+ /* C.1 Status bar — 三段:选区地址 / 聚合读数 / 输入模式徽章 */
4
+ .spreadsheet-status-bar {
5
+ display: flex;
6
+ align-items: center;
7
+ gap: 0;
8
+ min-height: var(--bottom-strip-h);
9
+ padding: 0;
10
+ border: none;
11
+ border-top: 1px solid var(--border);
12
+ background: var(--bg-chrome);
13
+ color: var(--text-default);
14
+ font-family: var(--excel-font);
15
+ font-size: 12px;
16
+ /* 数字等宽:聚合值变化时不改变字符宽度,状态栏不随之抖动 */
17
+ font-variant-numeric: tabular-nums;
18
+ overflow-x: auto;
19
+ white-space: nowrap;
20
+ }
21
+
22
+ .spreadsheet-status-bar .spreadsheet-status-bar-item {
23
+ display: inline-flex;
24
+ align-items: center;
25
+ align-self: stretch;
26
+ padding: 0 8px;
27
+ border-right: 1px solid var(--border);
28
+ color: var(--text-default);
29
+ font-weight: 600;
30
+ }
31
+
32
+ .spreadsheet-status-bar .spreadsheet-status-bar-aggregates {
33
+ display: inline-flex;
34
+ align-items: center;
35
+ align-self: stretch;
36
+ gap: 12px;
37
+ padding: 0 8px;
38
+ border-right: 1px solid var(--border);
39
+ }
40
+
41
+ .spreadsheet-status-bar .spreadsheet-status-bar-aggregate-summary {
42
+ position: absolute;
43
+ width: 1px;
44
+ height: 1px;
45
+ padding: 0;
46
+ margin: -1px;
47
+ overflow: hidden;
48
+ clip: rect(0, 0, 0, 0);
49
+ white-space: nowrap;
50
+ border: 0;
51
+ }
52
+
53
+ .spreadsheet-status-bar .spreadsheet-status-bar-aggregate {
54
+ display: inline-flex;
55
+ align-items: center;
56
+ flex-shrink: 0;
57
+ gap: 4px;
58
+ height: 18px;
59
+ color: var(--text-default);
60
+ }
61
+
62
+ .spreadsheet-status-bar .spreadsheet-status-bar-aggregate-label {
63
+ font-weight: 600;
64
+ }
65
+
66
+ .spreadsheet-status-bar .spreadsheet-status-bar-aggregate-value {
67
+ font-variant-numeric: tabular-nums;
68
+ }
69
+
70
+ .spreadsheet-status-bar .spreadsheet-status-bar-aggregate-empty {
71
+ color: var(--text-muted);
72
+ font-style: italic;
73
+ }
74
+
75
+ .spreadsheet-status-bar .spreadsheet-status-bar-aggregate-truncated {
76
+ color: var(--text-muted);
77
+ }
78
+
79
+ /* 输入模式徽章靠右 */
80
+ .spreadsheet-status-bar .spreadsheet-status-bar-mode-badge {
81
+ display: inline-flex;
82
+ align-items: center;
83
+ flex-shrink: 0;
84
+ align-self: stretch;
85
+ padding: 0 10px;
86
+ margin: 0 0 0 auto;
87
+ /* Excel 的 Ready/Edit 是状态栏上一段安静的文字,不是彩色徽章。 */
88
+ color: var(--text-muted);
89
+ font-weight: 600;
90
+ font-size: 12px;
91
+ }
92
+
93
+ .spreadsheet-status-bar--vertical .spreadsheet-status-bar-mode-badge {
94
+ margin-left: 8px;
95
+ }
96
+
97
+ /* C.2 聚合项勾选菜单(右键状态栏聚合区) */
98
+ .spreadsheet-status-bar-aggregate-menu {
99
+ position: fixed;
100
+ z-index: 60;
101
+ display: flex;
102
+ flex-direction: column;
103
+ min-width: 132px;
104
+ padding: 4px 0;
105
+ border: 1px solid var(--border-strong);
106
+ border-radius: var(--radius);
107
+ background: var(--bg-surface);
108
+ box-shadow: var(--shadow-popover);
109
+ font-family: var(--excel-font);
110
+ font-size: 12px;
111
+ }
112
+
113
+ .spreadsheet-status-bar-aggregate-menu-item {
114
+ display: inline-flex;
115
+ align-items: center;
116
+ gap: 6px;
117
+ height: 24px;
118
+ padding: 0 12px 0 6px;
119
+ border: none;
120
+ background: transparent;
121
+ color: var(--text-default);
122
+ font: inherit;
123
+ text-align: left;
124
+ cursor: pointer;
125
+ }
126
+
127
+ .spreadsheet-status-bar-aggregate-menu-item:hover,
128
+ .spreadsheet-status-bar-aggregate-menu-item:focus-visible {
129
+ background: var(--hover);
130
+ outline: none;
131
+ }
132
+
133
+ .spreadsheet-status-bar-aggregate-menu-check {
134
+ display: inline-block;
135
+ width: 12px;
136
+ color: var(--excel-green-text);
137
+ text-align: center;
138
+ }
139
+
140
+ /* C.3 诊断读数条 —— 仅开发/演示宿主挂载,见 SpreadsheetDiagnosticsReadout.tsx */
141
+ .spreadsheet-diagnostics-readout {
142
+ display: flex;
143
+ align-items: center;
144
+ min-height: 22px;
145
+ border-top: 1px solid var(--border);
146
+ background: var(--bg-chrome);
147
+ color: var(--text-muted);
148
+ font-family: var(--excel-font);
149
+ font-size: 11px;
150
+ font-variant-numeric: tabular-nums;
151
+ overflow-x: auto;
152
+ white-space: nowrap;
153
+ }
154
+
155
+ .spreadsheet-diagnostics-readout .spreadsheet-diagnostics-readout-item {
156
+ display: inline-flex;
157
+ align-items: center;
158
+ height: 22px;
159
+ padding: 0 8px;
160
+ border-right: 1px solid var(--border);
161
+ }
@@ -0,0 +1,278 @@
1
+ /* Number-format dropdown — anchored beneath the toolbar's number-format
2
+ button. Two-column rows (label left, preview right) mirroring Excel. */
3
+ .number-format-dropdown {
4
+ min-width: 240px;
5
+ padding: 4px 0;
6
+ background: var(--bg-surface);
7
+ border: 1px solid var(--border-strong);
8
+ border-radius: 2px;
9
+ box-shadow: var(--shadow-popover);
10
+ font-family: var(--excel-font);
11
+ font-size: 12px;
12
+ }
13
+
14
+ .number-format-dropdown-item {
15
+ display: flex;
16
+ align-items: center;
17
+ justify-content: space-between;
18
+ width: 100%;
19
+ padding: 4px 12px;
20
+ border: none;
21
+ background: transparent;
22
+ color: var(--text-default);
23
+ font: inherit;
24
+ text-align: left;
25
+ cursor: pointer;
26
+ }
27
+
28
+ .number-format-dropdown-item:hover:not(:disabled) {
29
+ background: var(--select-bg);
30
+ }
31
+
32
+ .number-format-dropdown-custom {
33
+ position: relative;
34
+ }
35
+
36
+ .number-format-dropdown-custom-open > .number-format-dropdown-item,
37
+ .number-format-dropdown-item-with-submenu[aria-expanded='true'] {
38
+ background: var(--select-bg);
39
+ }
40
+
41
+ .number-format-dropdown-item-with-submenu {
42
+ padding-right: 10px;
43
+ }
44
+
45
+ .number-format-dropdown-submenu-arrow {
46
+ width: 0;
47
+ height: 0;
48
+ margin-left: 12px;
49
+ border-top: 4px solid transparent;
50
+ border-bottom: 4px solid transparent;
51
+ border-left: 5px solid var(--text-muted);
52
+ flex: 0 0 auto;
53
+ }
54
+
55
+ .number-format-dropdown-submenu {
56
+ position: absolute;
57
+ top: -5px;
58
+ left: calc(100% - 2px);
59
+ z-index: 501;
60
+ min-width: 196px;
61
+ padding: 4px 0;
62
+ background: var(--bg-surface);
63
+ border: 1px solid var(--border-strong);
64
+ border-radius: 2px;
65
+ box-shadow: var(--shadow-popover);
66
+ }
67
+
68
+ .number-format-dropdown-submenu-item {
69
+ display: block;
70
+ width: 100%;
71
+ padding: 5px 12px;
72
+ border: none;
73
+ background: transparent;
74
+ color: var(--text-default);
75
+ font: inherit;
76
+ text-align: left;
77
+ white-space: nowrap;
78
+ cursor: pointer;
79
+ }
80
+
81
+ .number-format-dropdown-submenu-item:hover {
82
+ background: var(--select-bg);
83
+ }
84
+
85
+ .number-format-dropdown-item-disabled,
86
+ .number-format-dropdown-item:disabled {
87
+ color: var(--text-disabled);
88
+ cursor: default;
89
+ }
90
+
91
+ .number-format-dropdown-label {
92
+ flex: 1;
93
+ margin-right: 16px;
94
+ }
95
+
96
+ .number-format-dropdown-preview {
97
+ color: var(--text-muted);
98
+ font-variant-numeric: tabular-nums;
99
+ }
100
+
101
+ /* Toolbar fill/text color popover */
102
+ .spreadsheet-color-popover {
103
+ box-sizing: border-box;
104
+ display: flex;
105
+ flex-direction: column;
106
+ gap: 4px;
107
+ min-width: 226px;
108
+ padding: 8px;
109
+ background: var(--bg-surface);
110
+ border: 1px solid var(--border-strong);
111
+ border-radius: var(--radius);
112
+ box-shadow: var(--shadow-popover);
113
+ user-select: none;
114
+ font-family: var(--excel-font);
115
+ color: var(--text-default);
116
+ }
117
+
118
+ .spreadsheet-color-popover-no-fill {
119
+ box-sizing: border-box;
120
+ display: flex;
121
+ min-height: var(--control-h);
122
+ align-items: center;
123
+ gap: 8px;
124
+ width: 100%;
125
+ text-align: left;
126
+ padding: 0 8px;
127
+ border: 1px solid transparent;
128
+ background: transparent;
129
+ font: inherit;
130
+ font-size: 12px;
131
+ color: var(--text-default);
132
+ cursor: pointer;
133
+ border-radius: var(--control-radius);
134
+ line-height: 1.2;
135
+ }
136
+
137
+ .spreadsheet-color-popover-no-fill:hover,
138
+ .spreadsheet-color-popover-no-fill:focus-visible {
139
+ background: var(--hover);
140
+ }
141
+
142
+ .spreadsheet-color-popover-no-fill[data-selected='true'] {
143
+ border-color: var(--excel-green);
144
+ background: var(--select-bg);
145
+ color: var(--excel-green-text);
146
+ }
147
+
148
+ .spreadsheet-color-popover-no-fill:focus-visible {
149
+ border-color: var(--office-blue);
150
+ outline: 2px solid var(--office-blue);
151
+ outline-offset: 1px;
152
+ }
153
+
154
+ .spreadsheet-color-popover-no-fill:active {
155
+ background: var(--active-bg);
156
+ }
157
+
158
+ .spreadsheet-color-popover-no-fill-icon {
159
+ display: inline-flex;
160
+ width: 16px;
161
+ height: 16px;
162
+ align-items: center;
163
+ justify-content: center;
164
+ flex-shrink: 0;
165
+ }
166
+
167
+ .spreadsheet-color-popover-no-fill-label {
168
+ flex: 1;
169
+ }
170
+
171
+ .spreadsheet-color-popover-section-title {
172
+ padding: 2px 4px;
173
+ margin-top: 2px;
174
+ font-size: 11px;
175
+ color: var(--text-muted);
176
+ letter-spacing: 0.02em;
177
+ }
178
+
179
+ .spreadsheet-color-popover-grid {
180
+ display: flex;
181
+ flex-direction: column;
182
+ gap: 2px;
183
+ padding: 2px 0;
184
+ }
185
+
186
+ .spreadsheet-color-popover-row {
187
+ display: flex;
188
+ gap: 2px;
189
+ }
190
+
191
+ .spreadsheet-color-popover-swatch {
192
+ box-sizing: border-box;
193
+ width: var(--control-h);
194
+ height: var(--control-h);
195
+ padding: 0;
196
+ border: 1px solid var(--border-strong);
197
+ cursor: pointer;
198
+ border-radius: var(--control-radius);
199
+ }
200
+
201
+ .spreadsheet-color-popover-swatch:hover,
202
+ .spreadsheet-color-popover-swatch:focus-visible {
203
+ outline: 2px solid var(--office-blue);
204
+ outline-offset: 1px;
205
+ }
206
+
207
+ .spreadsheet-color-popover-swatch[data-selected='true'] {
208
+ border: 2px solid var(--excel-green);
209
+ box-shadow: inset 0 0 0 1px var(--bg-surface);
210
+ }
211
+
212
+ .spreadsheet-color-popover-swatch:active {
213
+ outline-color: var(--office-blue);
214
+ box-shadow: inset 0 0 0 2px var(--active-bg);
215
+ }
216
+
217
+ .spreadsheet-color-popover-more {
218
+ box-sizing: border-box;
219
+ display: flex;
220
+ min-height: var(--control-h);
221
+ align-items: center;
222
+ gap: 8px;
223
+ width: 100%;
224
+ text-align: left;
225
+ padding: 0 8px;
226
+ border: 1px solid transparent;
227
+ border-top: 1px solid var(--border);
228
+ background: transparent;
229
+ font: inherit;
230
+ font-size: 12px;
231
+ color: var(--text-default);
232
+ cursor: pointer;
233
+ border-radius: var(--control-radius);
234
+ margin-top: 2px;
235
+ }
236
+
237
+ .spreadsheet-color-popover-more:hover:not(:disabled),
238
+ .spreadsheet-color-popover-more:focus-visible:not(:disabled) {
239
+ background: var(--hover);
240
+ border-color: var(--office-blue);
241
+ outline: 2px solid var(--office-blue);
242
+ outline-offset: 1px;
243
+ }
244
+
245
+ .spreadsheet-color-popover-more:disabled {
246
+ color: var(--text-disabled);
247
+ cursor: not-allowed;
248
+ }
249
+
250
+ .spreadsheet-color-popover-more-icon {
251
+ display: inline-flex;
252
+ width: 16px;
253
+ height: 16px;
254
+ align-items: center;
255
+ justify-content: center;
256
+ flex-shrink: 0;
257
+ opacity: 0.85;
258
+ }
259
+
260
+ .spreadsheet-color-popover-more:disabled .spreadsheet-color-popover-more-icon {
261
+ opacity: 0.5;
262
+ }
263
+
264
+ .spreadsheet-color-popover-more-label {
265
+ flex: 1;
266
+ }
267
+
268
+ .spreadsheet-color-popover-hint {
269
+ min-height: 16px;
270
+ font-size: 11px;
271
+ color: var(--text-muted);
272
+ padding: 2px 4px 0;
273
+ font-family: var(--excel-font);
274
+ font-variant-numeric: tabular-nums;
275
+ border-top: 1px solid var(--border);
276
+ margin-top: 2px;
277
+ padding-top: 4px;
278
+ }
@@ -0,0 +1,213 @@
1
+ /* A.2 Toolbar — button groups separated by thin dividers, icon-like look.
2
+ The Univer slim layout wraps to a second row when the viewport narrows
3
+ instead of showing an overflow chevron, so flex-wrap drives the reflow
4
+ and overflow-x stays visible. */
5
+ .spreadsheet-toolbar {
6
+ display: flex;
7
+ align-items: center;
8
+ flex-wrap: wrap;
9
+ gap: 2px;
10
+ min-height: 40px;
11
+ padding: 4px 10px;
12
+ background: var(--bg-toolbar);
13
+ border-bottom: 1px solid var(--border);
14
+ font-family: var(--excel-font);
15
+ font-size: 13px;
16
+ overflow-x: visible;
17
+ white-space: nowrap;
18
+ color: var(--text-default);
19
+ }
20
+
21
+ .spreadsheet-toolbar .spreadsheet-toolbar-button {
22
+ display: inline-flex;
23
+ align-items: center;
24
+ justify-content: center;
25
+ min-width: var(--control-h);
26
+ height: var(--control-h);
27
+ padding: 0 6px;
28
+ margin: 0;
29
+ border: 1px solid transparent;
30
+ border-radius: 4px;
31
+ background: transparent;
32
+ color: inherit;
33
+ font: inherit;
34
+ cursor: pointer;
35
+ transition: background 100ms ease-out, border-color 100ms ease-out;
36
+ }
37
+
38
+ /* Toolbar SVG glyphs — 16px keeps the visual mass comparable to Univer's
39
+ slim toolbar without crowding the 28px hit target. */
40
+ .spreadsheet-toolbar .spreadsheet-toolbar-button > svg {
41
+ width: 16px;
42
+ height: 16px;
43
+ flex-shrink: 0;
44
+ }
45
+
46
+ /* Faint vertical separator between toolbar button groups. The JSX places an
47
+ explicit <span class="spreadsheet-toolbar-separator"> between groups,
48
+ matching Univer's slim layout:
49
+ [history] | [font] | [textStyle] | [color] | [align] | [merge] | [number] */
50
+ .spreadsheet-toolbar > .spreadsheet-toolbar-separator {
51
+ display: inline-block;
52
+ width: 1px;
53
+ height: 20px;
54
+ background: var(--border);
55
+ margin: 0 6px;
56
+ flex-shrink: 0;
57
+ }
58
+
59
+ /* Currency-dropdown opener: text + chevron (no icon). The button reads
60
+ wider than a 24x24 hit target so it gets explicit padding. */
61
+ .spreadsheet-toolbar .spreadsheet-toolbar-currency-opener {
62
+ min-width: 80px;
63
+ padding: 0 8px;
64
+ gap: 4px;
65
+ font-weight: 500;
66
+ }
67
+
68
+ .spreadsheet-toolbar .spreadsheet-toolbar-currency-opener > .toolbar-chevron {
69
+ margin-left: 2px;
70
+ opacity: 0.65;
71
+ }
72
+
73
+ .spreadsheet-toolbar .spreadsheet-toolbar-button:hover:not(:disabled) {
74
+ background: var(--hover);
75
+ border-color: var(--border);
76
+ }
77
+
78
+ .spreadsheet-toolbar .spreadsheet-toolbar-button[aria-pressed='true'],
79
+ /* is-active:下拉开启 / 格式命中等由组件计算的活跃态(原 fmt-btn-active)。 */
80
+ .spreadsheet-toolbar .spreadsheet-toolbar-button.is-active {
81
+ background: var(--active-bg);
82
+ border-color: var(--border-strong);
83
+ }
84
+
85
+ .spreadsheet-toolbar .spreadsheet-toolbar-button:disabled {
86
+ color: var(--text-disabled);
87
+ cursor: default;
88
+ }
89
+
90
+ /* Format Painter state colors — armed / sticky */
91
+ .spreadsheet-toolbar
92
+ .spreadsheet-toolbar-button[data-format-painter-state='armed'],
93
+ .spreadsheet-toolbar
94
+ .spreadsheet-toolbar-button[data-format-painter-state='sticky'] {
95
+ background: var(--select-bg);
96
+ border-color: var(--excel-green);
97
+ color: var(--excel-green-text);
98
+ }
99
+
100
+ /*
101
+ * Custom hover tooltips for toolbar buttons. Replaces the native
102
+ * title="..." pop-up (which has a multi-second OS delay and OS styling)
103
+ * with a dark-bubble tip that animates in after 500 ms — matches Univer /
104
+ * MS Office conventions.
105
+ *
106
+ * Accessibility note: each button still carries aria-label, so screen
107
+ * readers pick up the label even though we dropped title=.
108
+ *
109
+ * Suppressed when an associated menu/dialog is open (aria-expanded=true)
110
+ * so the tooltip does not stack on top of the dropdown panel.
111
+ */
112
+ .spreadsheet-toolbar [data-tooltip] {
113
+ position: relative;
114
+ }
115
+
116
+ .spreadsheet-toolbar [data-tooltip]:hover::after,
117
+ .spreadsheet-toolbar [data-tooltip]:focus-visible::after {
118
+ content: attr(data-tooltip);
119
+ position: absolute;
120
+ top: calc(100% + 6px);
121
+ left: 50%;
122
+ transform: translateX(-50%);
123
+ background: rgba(34, 34, 34, 0.92);
124
+ color: #fff;
125
+ padding: 4px 8px;
126
+ border-radius: 4px;
127
+ font-size: 12px;
128
+ line-height: 1.3;
129
+ font-weight: 400;
130
+ white-space: nowrap;
131
+ pointer-events: none;
132
+ z-index: 10000;
133
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
134
+ animation: spreadsheet-toolbar-tooltip-fade-in 140ms 500ms both;
135
+ }
136
+
137
+ /* Little arrow above the bubble pointing at the button. */
138
+ .spreadsheet-toolbar [data-tooltip]:hover::before,
139
+ .spreadsheet-toolbar [data-tooltip]:focus-visible::before {
140
+ content: '';
141
+ position: absolute;
142
+ top: calc(100% + 1px);
143
+ left: 50%;
144
+ width: 0;
145
+ height: 0;
146
+ border-left: 4px solid transparent;
147
+ border-right: 4px solid transparent;
148
+ border-bottom: 5px solid rgba(34, 34, 34, 0.92);
149
+ transform: translateX(-50%);
150
+ pointer-events: none;
151
+ z-index: 10000;
152
+ animation: spreadsheet-toolbar-tooltip-fade-in 140ms 500ms both;
153
+ }
154
+
155
+ /* Suppress while the button has an open menu/dialog so the tooltip
156
+ doesn't sit on top of the popover. */
157
+ .spreadsheet-toolbar [data-tooltip][aria-expanded='true']:hover::after,
158
+ .spreadsheet-toolbar [data-tooltip][aria-expanded='true']:hover::before,
159
+ .spreadsheet-toolbar [data-tooltip]:disabled:hover::after,
160
+ .spreadsheet-toolbar [data-tooltip]:disabled:hover::before {
161
+ display: none;
162
+ }
163
+
164
+ @keyframes spreadsheet-toolbar-tooltip-fade-in {
165
+ from {
166
+ opacity: 0;
167
+ transform: translateX(-50%) translateY(-2px);
168
+ }
169
+ to {
170
+ opacity: 1;
171
+ transform: translateX(-50%) translateY(0);
172
+ }
173
+ }
174
+
175
+ /* Combo 形态的文本控件(字体/字号/数字格式开启器):白底 + 发丝边 + 尾部
176
+ 下拉箭头,与 Excel for web 的组合框同构 —— 区别于纯图标按钮的隐形边框,
177
+ 一眼可读"这是个下拉"。 */
178
+ .spreadsheet-toolbar .spreadsheet-toolbar-combo,
179
+ .spreadsheet-toolbar .spreadsheet-toolbar-currency-opener {
180
+ justify-content: flex-start;
181
+ gap: 4px;
182
+ border-color: var(--border);
183
+ border-radius: var(--radius);
184
+ background: var(--bg-surface);
185
+ overflow: hidden;
186
+ white-space: nowrap;
187
+ }
188
+
189
+ .spreadsheet-toolbar .spreadsheet-toolbar-combo::after {
190
+ content: '';
191
+ flex-shrink: 0;
192
+ width: 0;
193
+ height: 0;
194
+ margin-left: auto;
195
+ border-left: 3px solid transparent;
196
+ border-right: 3px solid transparent;
197
+ border-top: 4px solid var(--text-muted);
198
+ }
199
+
200
+ .spreadsheet-toolbar .spreadsheet-toolbar-combo--font {
201
+ width: 108px;
202
+ }
203
+
204
+ .spreadsheet-toolbar .spreadsheet-toolbar-combo--size {
205
+ width: 48px;
206
+ }
207
+
208
+ /* combo 的 hover 保持白底、只加深边框(Excel 口径),覆盖通用按钮 hover。 */
209
+ .spreadsheet-toolbar .spreadsheet-toolbar-combo:hover:not(:disabled),
210
+ .spreadsheet-toolbar .spreadsheet-toolbar-currency-opener:hover:not(:disabled) {
211
+ background: var(--bg-surface);
212
+ border-color: var(--border-strong);
213
+ }