@portone/docx-editor 0.1.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/CHANGELOG.md +7 -0
- package/CONTRIBUTING.md +63 -0
- package/LICENSE +203 -0
- package/README.md +48 -0
- package/assets/editor.png +0 -0
- package/dist/DocxEditor.d.ts +123 -0
- package/dist/DocxEditor.js +348 -0
- package/dist/core.d.ts +36 -0
- package/dist/core.js +38 -0
- package/dist/docx/comments/constants.d.ts +8 -0
- package/dist/docx/comments/constants.js +20 -0
- package/dist/docx/comments/model.d.ts +37 -0
- package/dist/docx/comments/model.js +104 -0
- package/dist/docx/comments/reading.d.ts +36 -0
- package/dist/docx/comments/reading.js +149 -0
- package/dist/docx/comments/writing.d.ts +11 -0
- package/dist/docx/comments/writing.js +327 -0
- package/dist/docx/comments.d.ts +3 -0
- package/dist/docx/comments.js +4 -0
- package/dist/docx/container.d.ts +12 -0
- package/dist/docx/container.js +130 -0
- package/dist/docx/documentSettings.d.ts +4 -0
- package/dist/docx/documentSettings.js +14 -0
- package/dist/docx/exportDocx.d.ts +15 -0
- package/dist/docx/exportDocx.js +163 -0
- package/dist/docx/exportRefs.d.ts +16 -0
- package/dist/docx/exportRefs.js +10 -0
- package/dist/docx/formatting/direct.d.ts +30 -0
- package/dist/docx/formatting/direct.js +201 -0
- package/dist/docx/formatting/effectiveParagraph.d.ts +15 -0
- package/dist/docx/formatting/effectiveParagraph.js +81 -0
- package/dist/docx/formatting/styles.d.ts +67 -0
- package/dist/docx/formatting/styles.js +165 -0
- package/dist/docx/formatting/tabStops.d.ts +8 -0
- package/dist/docx/formatting/tabStops.js +65 -0
- package/dist/docx/formatting.d.ts +4 -0
- package/dist/docx/formatting.js +4 -0
- package/dist/docx/headersFooters.d.ts +36 -0
- package/dist/docx/headersFooters.js +218 -0
- package/dist/docx/hyperlink.d.ts +75 -0
- package/dist/docx/hyperlink.js +71 -0
- package/dist/docx/importDocx.d.ts +21 -0
- package/dist/docx/importDocx.js +263 -0
- package/dist/docx/importParagraph.d.ts +32 -0
- package/dist/docx/importParagraph.js +308 -0
- package/dist/docx/importTable.d.ts +9 -0
- package/dist/docx/importTable.js +275 -0
- package/dist/docx/media.d.ts +60 -0
- package/dist/docx/media.js +213 -0
- package/dist/docx/notes.d.ts +22 -0
- package/dist/docx/notes.js +71 -0
- package/dist/docx/pageGeometry.d.ts +75 -0
- package/dist/docx/pageGeometry.js +88 -0
- package/dist/docx/paraProps.d.ts +74 -0
- package/dist/docx/paraProps.js +167 -0
- package/dist/docx/propsXml.d.ts +49 -0
- package/dist/docx/propsXml.js +302 -0
- package/dist/docx/relationships.d.ts +42 -0
- package/dist/docx/relationships.js +94 -0
- package/dist/docx/runProps.d.ts +51 -0
- package/dist/docx/runProps.js +207 -0
- package/dist/docx/scan.d.ts +20 -0
- package/dist/docx/scan.js +110 -0
- package/dist/docx/sdt.d.ts +56 -0
- package/dist/docx/sdt.js +104 -0
- package/dist/docx/sdtProps.d.ts +18 -0
- package/dist/docx/sdtProps.js +11 -0
- package/dist/docx/serializeBlock.d.ts +4 -0
- package/dist/docx/serializeBlock.js +30 -0
- package/dist/docx/serializeParagraph.d.ts +15 -0
- package/dist/docx/serializeParagraph.js +208 -0
- package/dist/docx/serializeTable.d.ts +12 -0
- package/dist/docx/serializeTable.js +134 -0
- package/dist/docx/session.d.ts +81 -0
- package/dist/docx/session.js +79 -0
- package/dist/docx/tableFormatting/editing.d.ts +64 -0
- package/dist/docx/tableFormatting/editing.js +318 -0
- package/dist/docx/tableFormatting/reading.d.ts +96 -0
- package/dist/docx/tableFormatting/reading.js +221 -0
- package/dist/docx/tableFormatting.d.ts +2 -0
- package/dist/docx/tableFormatting.js +3 -0
- package/dist/docx/tableTemplate.d.ts +22 -0
- package/dist/docx/tableTemplate.js +111 -0
- package/dist/docx/theme.d.ts +40 -0
- package/dist/docx/theme.js +61 -0
- package/dist/docx/uniqueControls.d.ts +14 -0
- package/dist/docx/uniqueControls.js +62 -0
- package/dist/download.d.ts +57 -0
- package/dist/download.js +44 -0
- package/dist/editor/clipboard/images.d.ts +14 -0
- package/dist/editor/clipboard/images.js +158 -0
- package/dist/editor/clipboard/inlineFormatting.d.ts +21 -0
- package/dist/editor/clipboard/inlineFormatting.js +232 -0
- package/dist/editor/commands/breakCommands.d.ts +8 -0
- package/dist/editor/commands/breakCommands.js +19 -0
- package/dist/editor/commands/canRunCommand.d.ts +6 -0
- package/dist/editor/commands/canRunCommand.js +10 -0
- package/dist/editor/commands/commentCommands.d.ts +3 -0
- package/dist/editor/commands/commentCommands.js +4 -0
- package/dist/editor/commands/comments/editing.d.ts +21 -0
- package/dist/editor/commands/comments/editing.js +305 -0
- package/dist/editor/commands/comments/model.d.ts +31 -0
- package/dist/editor/commands/comments/model.js +0 -0
- package/dist/editor/commands/comments/reading.d.ts +8 -0
- package/dist/editor/commands/comments/reading.js +58 -0
- package/dist/editor/commands/formatting/editing.d.ts +32 -0
- package/dist/editor/commands/formatting/editing.js +138 -0
- package/dist/editor/commands/formatting/reading.d.ts +57 -0
- package/dist/editor/commands/formatting/reading.js +82 -0
- package/dist/editor/commands/formatting/shared.d.ts +32 -0
- package/dist/editor/commands/formatting/shared.js +53 -0
- package/dist/editor/commands/formattingCommands.d.ts +2 -0
- package/dist/editor/commands/formattingCommands.js +3 -0
- package/dist/editor/commands/historyCommands.d.ts +11 -0
- package/dist/editor/commands/historyCommands.js +16 -0
- package/dist/editor/commands/indentCommands.d.ts +15 -0
- package/dist/editor/commands/indentCommands.js +44 -0
- package/dist/editor/commands/index.d.ts +82 -0
- package/dist/editor/commands/index.js +171 -0
- package/dist/editor/commands/linkCommands.d.ts +56 -0
- package/dist/editor/commands/linkCommands.js +146 -0
- package/dist/editor/commands/listCommands.d.ts +58 -0
- package/dist/editor/commands/listCommands.js +140 -0
- package/dist/editor/commands/lockCommands.d.ts +47 -0
- package/dist/editor/commands/lockCommands.js +198 -0
- package/dist/editor/commands/noteQueries.d.ts +12 -0
- package/dist/editor/commands/noteQueries.js +29 -0
- package/dist/editor/commands/paragraphCommands.d.ts +59 -0
- package/dist/editor/commands/paragraphCommands.js +113 -0
- package/dist/editor/commands/spacingCommands.d.ts +23 -0
- package/dist/editor/commands/spacingCommands.js +48 -0
- package/dist/editor/commands/tabCommands.d.ts +5 -0
- package/dist/editor/commands/tabCommands.js +65 -0
- package/dist/editor/createEditor.d.ts +59 -0
- package/dist/editor/createEditor.js +160 -0
- package/dist/editor/documentStyles.d.ts +60 -0
- package/dist/editor/documentStyles.js +80 -0
- package/dist/editor/externalClipboard.d.ts +11 -0
- package/dist/editor/externalClipboard.js +323 -0
- package/dist/editor/imageFiles.d.ts +74 -0
- package/dist/editor/imageFiles.js +173 -0
- package/dist/editor/insertImage.d.ts +31 -0
- package/dist/editor/insertImage.js +35 -0
- package/dist/editor/insertTable.d.ts +18 -0
- package/dist/editor/insertTable.js +44 -0
- package/dist/editor/paragraphEdits.d.ts +42 -0
- package/dist/editor/paragraphEdits.js +59 -0
- package/dist/editor/plainText.d.ts +3 -0
- package/dist/editor/plainText.js +50 -0
- package/dist/editor/plugins/bookmarkProtection.d.ts +3 -0
- package/dist/editor/plugins/bookmarkProtection.js +28 -0
- package/dist/editor/plugins/columnResize.d.ts +27 -0
- package/dist/editor/plugins/columnResize.js +192 -0
- package/dist/editor/plugins/commentDecorations.d.ts +3 -0
- package/dist/editor/plugins/commentDecorations.js +23 -0
- package/dist/editor/plugins/commentReservations.d.ts +5 -0
- package/dist/editor/plugins/commentReservations.js +26 -0
- package/dist/editor/plugins/dropCaret.d.ts +10 -0
- package/dist/editor/plugins/dropCaret.js +11 -0
- package/dist/editor/plugins/imagePaste.d.ts +8 -0
- package/dist/editor/plugins/imagePaste.js +265 -0
- package/dist/editor/plugins/keymap.d.ts +5 -0
- package/dist/editor/plugins/keymap.js +94 -0
- package/dist/editor/plugins/linkPanel.d.ts +23 -0
- package/dist/editor/plugins/linkPanel.js +39 -0
- package/dist/editor/plugins/listInputRules.d.ts +14 -0
- package/dist/editor/plugins/listInputRules.js +36 -0
- package/dist/editor/plugins/lockedContent.d.ts +6 -0
- package/dist/editor/plugins/lockedContent.js +41 -0
- package/dist/editor/plugins/noteProtection.d.ts +3 -0
- package/dist/editor/plugins/noteProtection.js +25 -0
- package/dist/editor/plugins/numberingDecorations.d.ts +42 -0
- package/dist/editor/plugins/numberingDecorations.js +110 -0
- package/dist/editor/plugins/rowResize.d.ts +15 -0
- package/dist/editor/plugins/rowResize.js +196 -0
- package/dist/editor/plugins/styledParagraphs.d.ts +15 -0
- package/dist/editor/plugins/styledParagraphs.js +65 -0
- package/dist/editor/plugins/tabCaret.d.ts +3 -0
- package/dist/editor/plugins/tabCaret.js +126 -0
- package/dist/editor/plugins/tabDecorations.d.ts +11 -0
- package/dist/editor/plugins/tabDecorations.js +87 -0
- package/dist/editor/plugins/tabLayout.d.ts +16 -0
- package/dist/editor/plugins/tabLayout.js +328 -0
- package/dist/editor/plugins/tabPointer.d.ts +7 -0
- package/dist/editor/plugins/tabPointer.js +95 -0
- package/dist/editor/plugins/tableContextMenu.d.ts +21 -0
- package/dist/editor/plugins/tableContextMenu.js +88 -0
- package/dist/editor/plugins/textContextMenu.d.ts +15 -0
- package/dist/editor/plugins/textContextMenu.js +90 -0
- package/dist/editor/views/imageResize.d.ts +53 -0
- package/dist/editor/views/imageResize.js +167 -0
- package/dist/editor/views/runMarkView.d.ts +15 -0
- package/dist/editor/views/runMarkView.js +9 -0
- package/dist/editor/views/tableView.d.ts +24 -0
- package/dist/editor/views/tableView.js +32 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.js +38 -0
- package/dist/model/format.d.ts +240 -0
- package/dist/model/format.js +305 -0
- package/dist/model/tabStops.d.ts +17 -0
- package/dist/model/tabStops.js +22 -0
- package/dist/numbering/listTemplate.d.ts +29 -0
- package/dist/numbering/listTemplate.js +83 -0
- package/dist/numbering/markers.d.ts +24 -0
- package/dist/numbering/markers.js +93 -0
- package/dist/numbering/parseNumbering.d.ts +65 -0
- package/dist/numbering/parseNumbering.js +116 -0
- package/dist/numbering/writeNumbering.d.ts +13 -0
- package/dist/numbering/writeNumbering.js +49 -0
- package/dist/ooxml/errors.d.ts +39 -0
- package/dist/ooxml/errors.js +21 -0
- package/dist/ooxml/image.d.ts +88 -0
- package/dist/ooxml/image.js +106 -0
- package/dist/ooxml/tabStops.d.ts +3 -0
- package/dist/ooxml/tabStops.js +51 -0
- package/dist/ooxml/units.d.ts +37 -0
- package/dist/ooxml/units.js +116 -0
- package/dist/ooxml/xml.d.ts +36 -0
- package/dist/ooxml/xml.js +89 -0
- package/dist/page/PageGuides.d.ts +16 -0
- package/dist/page/PageGuides.js +114 -0
- package/dist/page/measureBlocks.d.ts +25 -0
- package/dist/page/measureBlocks.js +80 -0
- package/dist/page/pageDecorations.d.ts +36 -0
- package/dist/page/pageDecorations.js +211 -0
- package/dist/page/pageLayout.d.ts +176 -0
- package/dist/page/pageLayout.js +157 -0
- package/dist/page/tableMeasurements.d.ts +10 -0
- package/dist/page/tableMeasurements.js +115 -0
- package/dist/page/usePageLayout.d.ts +57 -0
- package/dist/page/usePageLayout.js +141 -0
- package/dist/schema/docxSchema.d.ts +9 -0
- package/dist/schema/docxSchema.js +863 -0
- package/dist/schema/index.d.ts +2 -0
- package/dist/schema/index.js +9 -0
- package/dist/schema/locks.d.ts +112 -0
- package/dist/schema/locks.js +211 -0
- package/dist/schema/rendering.d.ts +6 -0
- package/dist/schema/rendering.js +46 -0
- package/dist/styles/classNames.d.ts +214 -0
- package/dist/styles/classNames.js +208 -0
- package/dist/styles/colors.d.ts +11 -0
- package/dist/styles/colors.js +14 -0
- package/dist/styles/fontSizes.d.ts +6 -0
- package/dist/styles/fontSizes.js +20 -0
- package/dist/styles/fontStack.d.ts +55 -0
- package/dist/styles/fontStack.js +262 -0
- package/dist/styles/fonts.d.ts +6 -0
- package/dist/styles/fonts.js +11 -0
- package/dist/styles/inlineStyle.d.ts +67 -0
- package/dist/styles/inlineStyle.js +212 -0
- package/dist/styles/lineSpacings.d.ts +11 -0
- package/dist/styles/lineSpacings.js +10 -0
- package/dist/styles.css +1650 -0
- package/dist/table/cellBorders.d.ts +12 -0
- package/dist/table/cellBorders.js +9 -0
- package/dist/table/cellFormatting.d.ts +57 -0
- package/dist/table/cellFormatting.js +173 -0
- package/dist/table/columns.d.ts +25 -0
- package/dist/table/columns.js +155 -0
- package/dist/table/commands.d.ts +19 -0
- package/dist/table/commands.js +63 -0
- package/dist/table/format.d.ts +35 -0
- package/dist/table/format.js +26 -0
- package/dist/table/gridBorders.d.ts +42 -0
- package/dist/table/gridBorders.js +192 -0
- package/dist/table/index.d.ts +16 -0
- package/dist/table/index.js +52 -0
- package/dist/table/merge.d.ts +36 -0
- package/dist/table/merge.js +125 -0
- package/dist/table/resize.d.ts +55 -0
- package/dist/table/resize.js +66 -0
- package/dist/table/rowResize.d.ts +14 -0
- package/dist/table/rowResize.js +44 -0
- package/dist/table/rows.d.ts +32 -0
- package/dist/table/rows.js +89 -0
- package/dist/table/widths.d.ts +69 -0
- package/dist/table/widths.js +97 -0
- package/dist/ui/AlignMenu.d.ts +15 -0
- package/dist/ui/AlignMenu.js +64 -0
- package/dist/ui/CellStyleGroup.d.ts +15 -0
- package/dist/ui/CellStyleGroup.js +232 -0
- package/dist/ui/ColorPicker.d.ts +13 -0
- package/dist/ui/ColorPicker.js +165 -0
- package/dist/ui/CommentsPanel.d.ts +15 -0
- package/dist/ui/CommentsPanel.js +348 -0
- package/dist/ui/FontFamilySelect.d.ts +14 -0
- package/dist/ui/FontFamilySelect.js +59 -0
- package/dist/ui/FontSizeSelect.d.ts +11 -0
- package/dist/ui/FontSizeSelect.js +49 -0
- package/dist/ui/InsertImageButton.d.ts +9 -0
- package/dist/ui/InsertImageButton.js +47 -0
- package/dist/ui/LinkCard.d.ts +12 -0
- package/dist/ui/LinkCard.js +127 -0
- package/dist/ui/LinkPanel.d.ts +9 -0
- package/dist/ui/LinkPanel.js +121 -0
- package/dist/ui/MenuChoice.d.ts +11 -0
- package/dist/ui/MenuChoice.js +32 -0
- package/dist/ui/NotesPanel.d.ts +6 -0
- package/dist/ui/NotesPanel.js +33 -0
- package/dist/ui/ParagraphStyleSelect.d.ts +11 -0
- package/dist/ui/ParagraphStyleSelect.js +62 -0
- package/dist/ui/Popover.d.ts +22 -0
- package/dist/ui/Popover.js +74 -0
- package/dist/ui/SpacingMenu.d.ts +12 -0
- package/dist/ui/SpacingMenu.js +54 -0
- package/dist/ui/TableMenu.d.ts +12 -0
- package/dist/ui/TableMenu.js +112 -0
- package/dist/ui/TableSizePicker.d.ts +9 -0
- package/dist/ui/TableSizePicker.js +53 -0
- package/dist/ui/TextMenu.d.ts +15 -0
- package/dist/ui/TextMenu.js +194 -0
- package/dist/ui/Toolbar.d.ts +19 -0
- package/dist/ui/Toolbar.js +448 -0
- package/dist/ui/ToolbarButton.d.ts +23 -0
- package/dist/ui/ToolbarButton.js +56 -0
- package/dist/ui/Tooltip.d.ts +19 -0
- package/dist/ui/Tooltip.js +47 -0
- package/dist/ui/ZoomSelect.d.ts +7 -0
- package/dist/ui/ZoomSelect.js +44 -0
- package/dist/ui/comments/CommentComposer.d.ts +17 -0
- package/dist/ui/comments/CommentComposer.js +59 -0
- package/dist/ui/comments/useCommentRailLayout.d.ts +18 -0
- package/dist/ui/comments/useCommentRailLayout.js +183 -0
- package/dist/ui/keyboardWalk.d.ts +22 -0
- package/dist/ui/keyboardWalk.js +70 -0
- package/dist/ui/openAddress.d.ts +11 -0
- package/dist/ui/openAddress.js +16 -0
- package/dist/ui/panelPlacement.d.ts +51 -0
- package/dist/ui/panelPlacement.js +71 -0
- package/dist/ui/presets.d.ts +11 -0
- package/dist/ui/presets.js +0 -0
- package/dist/ui/rovingFocus.d.ts +20 -0
- package/dist/ui/rovingFocus.js +61 -0
- package/dist/ui/runCommand.d.ts +5 -0
- package/dist/ui/runCommand.js +13 -0
- package/dist/ui/useDismiss.d.ts +6 -0
- package/dist/ui/useDismiss.js +31 -0
- package/dist/ui/useFitWidthZoom.d.ts +2 -0
- package/dist/ui/useFitWidthZoom.js +26 -0
- package/dist/ui/useGridKeyboard.d.ts +12 -0
- package/dist/ui/useGridKeyboard.js +90 -0
- package/dist/ui/useMenuKeyboard.d.ts +12 -0
- package/dist/ui/useMenuKeyboard.js +56 -0
- package/dist/ui/zoom.d.ts +4 -0
- package/dist/ui/zoom.js +21 -0
- package/package.json +120 -0
package/dist/styles.css
ADDED
|
@@ -0,0 +1,1650 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The base appearance of the editing surface.
|
|
3
|
+
*
|
|
4
|
+
* The class names pair with src/styles/classNames.ts. If the prefix changes, change
|
|
5
|
+
* it in both.
|
|
6
|
+
* Text flows on one continuous sheet that is not divided into pages.
|
|
7
|
+
* The A4 boundaries are only approximate lines drawn over that sheet, so they never
|
|
8
|
+
* push the flow of the text.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
@import "prosemirror-view/style/prosemirror.css";
|
|
12
|
+
|
|
13
|
+
/* The height is usually decided by the host UI, so this is written to let the app's own class win */
|
|
14
|
+
:where(.docx-editor-frame) {
|
|
15
|
+
height: 100%;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/*
|
|
19
|
+
* Stacks the toolbar and the paper vertically, and carries the editor's own frame:
|
|
20
|
+
* a neutral border and rounded corners so a bare `<DocxEditor />` looks finished with
|
|
21
|
+
* no wrapper. Both are driven by variables, so an app restyles them without a wrapper
|
|
22
|
+
* (`--docx-editor-border: none` removes the frame; a themed colour replaces it).
|
|
23
|
+
* The corners are clipped here; scrolling is still owned by the inner box, and the
|
|
24
|
+
* panels that open from the toolbar and the table menu are placed against the screen,
|
|
25
|
+
* so the clip never reaches them.
|
|
26
|
+
*/
|
|
27
|
+
.docx-editor-frame {
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
background: #f1f1f1;
|
|
32
|
+
font-family: system-ui, sans-serif;
|
|
33
|
+
border: var(--docx-editor-border, 1px solid rgb(0 0 0 / 12%));
|
|
34
|
+
border-radius: var(--docx-editor-radius, 12px);
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.docx-editor-workspace {
|
|
39
|
+
--docx-editor-comments-width: 320px;
|
|
40
|
+
--docx-editor-horizontal-scrollbar-size: 10px;
|
|
41
|
+
|
|
42
|
+
position: relative;
|
|
43
|
+
display: flex;
|
|
44
|
+
flex: 1;
|
|
45
|
+
min-height: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.docx-editor-editor {
|
|
49
|
+
position: relative;
|
|
50
|
+
flex: 1;
|
|
51
|
+
min-width: 0;
|
|
52
|
+
min-height: 0;
|
|
53
|
+
overflow: auto;
|
|
54
|
+
padding: 24px 0;
|
|
55
|
+
background: #f1f1f1;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.docx-editor-comment-marker {
|
|
59
|
+
display: inline;
|
|
60
|
+
width: 0;
|
|
61
|
+
height: 0;
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* A body-level bookmark occupies a document-model position but draws no placeholder. */
|
|
66
|
+
.docx-editor-bookmark-block {
|
|
67
|
+
display: none;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.docx-editor-comment-range {
|
|
71
|
+
background: #fff2a8;
|
|
72
|
+
box-shadow: inset 0 -2px #e2b714;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Keep a tab's comment paint on an inline text box while its slot retains the full selection box. */
|
|
76
|
+
.docx-editor-tab:has(> .docx-editor-tab-slot.docx-editor-comment-range) {
|
|
77
|
+
background: #fff2a8;
|
|
78
|
+
box-shadow: inset 0 -2px #e2b714;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.docx-editor-tab-slot.docx-editor-comment-range {
|
|
82
|
+
background: transparent;
|
|
83
|
+
box-shadow: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.docx-editor-comments {
|
|
87
|
+
box-sizing: border-box;
|
|
88
|
+
position: absolute;
|
|
89
|
+
z-index: 3;
|
|
90
|
+
top: 0;
|
|
91
|
+
bottom: var(--docx-editor-horizontal-scrollbar-size);
|
|
92
|
+
width: var(--docx-editor-comments-width);
|
|
93
|
+
overflow: auto;
|
|
94
|
+
border-left: 1px solid rgb(0 0 0 / 10%);
|
|
95
|
+
background: #fafafa;
|
|
96
|
+
color: #242424;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.docx-editor-editor,
|
|
100
|
+
.docx-editor-comments {
|
|
101
|
+
scrollbar-width: thin;
|
|
102
|
+
scrollbar-color: #9ba3af #e7e9ed;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.docx-editor-editor {
|
|
106
|
+
scrollbar-gutter: stable;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.docx-editor-comments[data-view="rail"] {
|
|
110
|
+
bottom: auto;
|
|
111
|
+
overflow: visible;
|
|
112
|
+
border-left: 0;
|
|
113
|
+
background: transparent;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.docx-editor-comments[data-view="all"] {
|
|
117
|
+
position: relative;
|
|
118
|
+
top: auto;
|
|
119
|
+
bottom: auto;
|
|
120
|
+
left: auto !important;
|
|
121
|
+
flex: none;
|
|
122
|
+
overflow: auto;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.docx-editor-comments-toggle {
|
|
126
|
+
position: absolute;
|
|
127
|
+
z-index: 4;
|
|
128
|
+
top: 12px;
|
|
129
|
+
right: 16px;
|
|
130
|
+
padding: 4px 8px;
|
|
131
|
+
border: 1px solid rgb(0 0 0 / 12%);
|
|
132
|
+
border-radius: 6px;
|
|
133
|
+
background: #ffffff;
|
|
134
|
+
color: #4b5563;
|
|
135
|
+
cursor: pointer;
|
|
136
|
+
font: inherit;
|
|
137
|
+
font-size: 12px;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.docx-editor-comments-heading {
|
|
141
|
+
position: sticky;
|
|
142
|
+
z-index: 2;
|
|
143
|
+
top: 0;
|
|
144
|
+
display: flex;
|
|
145
|
+
align-items: center;
|
|
146
|
+
justify-content: space-between;
|
|
147
|
+
min-height: 52px;
|
|
148
|
+
padding: 0 16px;
|
|
149
|
+
background: #fafafa;
|
|
150
|
+
border-bottom: 1px solid rgb(0 0 0 / 8%);
|
|
151
|
+
font-size: max(10px, calc(14px * var(--docx-editor-zoom, 1)));
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.docx-editor-comments-heading h2 {
|
|
155
|
+
margin: 0;
|
|
156
|
+
font-size: inherit;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.docx-editor-comments-heading button {
|
|
160
|
+
padding: 4px 7px;
|
|
161
|
+
color: #555555;
|
|
162
|
+
background: transparent;
|
|
163
|
+
border: 0;
|
|
164
|
+
cursor: pointer;
|
|
165
|
+
font: inherit;
|
|
166
|
+
font-size: max(9px, calc(12px * var(--docx-editor-zoom, 1)));
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.docx-editor-comments-canvas {
|
|
170
|
+
position: relative;
|
|
171
|
+
min-height: 100%;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.docx-editor-comments[data-view="rail"] .docx-editor-comment-position {
|
|
175
|
+
position: absolute;
|
|
176
|
+
right: 0;
|
|
177
|
+
left: 0;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.docx-editor-comments[data-view="all"] .docx-editor-comments-canvas {
|
|
181
|
+
min-height: auto;
|
|
182
|
+
padding: 12px 16px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.docx-editor-comments[data-view="all"] .docx-editor-comment-position {
|
|
186
|
+
margin-bottom: 12px;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.docx-editor-comment-card,
|
|
190
|
+
.docx-editor-comment-composer {
|
|
191
|
+
padding: 12px;
|
|
192
|
+
border: 1px solid rgb(0 0 0 / 12%);
|
|
193
|
+
border-radius: 8px;
|
|
194
|
+
background: #ffffff;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.docx-editor-comment-reply {
|
|
198
|
+
padding: 10px 0 0;
|
|
199
|
+
margin-top: 10px;
|
|
200
|
+
border-top: 1px solid rgb(0 0 0 / 8%);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.docx-editor-comment-header {
|
|
204
|
+
display: flex;
|
|
205
|
+
align-items: flex-start;
|
|
206
|
+
justify-content: space-between;
|
|
207
|
+
gap: 8px;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.docx-editor-comment-icon-actions {
|
|
211
|
+
display: flex;
|
|
212
|
+
flex: none;
|
|
213
|
+
gap: 2px;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.docx-editor-comment-icon-actions button,
|
|
217
|
+
.docx-editor-color-apply {
|
|
218
|
+
display: inline-flex;
|
|
219
|
+
align-items: center;
|
|
220
|
+
justify-content: center;
|
|
221
|
+
width: 28px;
|
|
222
|
+
height: 28px;
|
|
223
|
+
padding: 0;
|
|
224
|
+
border: 0;
|
|
225
|
+
border-radius: 5px;
|
|
226
|
+
background: transparent;
|
|
227
|
+
color: #666666;
|
|
228
|
+
cursor: pointer;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.docx-editor-comment-icon-actions button:hover,
|
|
232
|
+
.docx-editor-color-apply:hover:not(:disabled) {
|
|
233
|
+
background: rgb(0 0 0 / 6%);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.docx-editor-comment-card > .docx-editor-comment-composer {
|
|
237
|
+
padding: 10px 0 0;
|
|
238
|
+
margin-top: 10px;
|
|
239
|
+
border: 0;
|
|
240
|
+
border-top: 1px solid rgb(0 0 0 / 8%);
|
|
241
|
+
border-radius: 0;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.docx-editor-comments-empty {
|
|
245
|
+
margin: 0;
|
|
246
|
+
padding: 72px 20px 0;
|
|
247
|
+
color: #777777;
|
|
248
|
+
font-size: max(10px, calc(13px * var(--docx-editor-zoom, 1)));
|
|
249
|
+
text-align: center;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.docx-editor-comment-meta {
|
|
253
|
+
display: block;
|
|
254
|
+
padding: 0;
|
|
255
|
+
border: 0;
|
|
256
|
+
background: transparent;
|
|
257
|
+
margin-bottom: 6px;
|
|
258
|
+
color: #666666;
|
|
259
|
+
font: inherit;
|
|
260
|
+
font-size: max(9px, calc(12px * var(--docx-editor-zoom, 1)));
|
|
261
|
+
text-align: left;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.docx-editor-comment-author,
|
|
265
|
+
.docx-editor-comment-date {
|
|
266
|
+
display: block;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.docx-editor-comment-author {
|
|
270
|
+
color: #242424;
|
|
271
|
+
font-weight: 600;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.docx-editor-comment-date {
|
|
275
|
+
margin-top: 2px;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
button.docx-editor-comment-meta {
|
|
279
|
+
cursor: pointer;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
button.docx-editor-comment-meta:disabled {
|
|
283
|
+
cursor: default;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.docx-editor-comment-body {
|
|
287
|
+
margin: 0;
|
|
288
|
+
color: #1f2937;
|
|
289
|
+
font-size: max(10px, calc(14px * var(--docx-editor-zoom, 1)));
|
|
290
|
+
white-space: pre-wrap;
|
|
291
|
+
overflow-wrap: anywhere;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
button.docx-editor-comment-body {
|
|
295
|
+
display: block;
|
|
296
|
+
width: 100%;
|
|
297
|
+
padding: 0;
|
|
298
|
+
border: 0;
|
|
299
|
+
background: transparent;
|
|
300
|
+
color: #1f2937;
|
|
301
|
+
cursor: text;
|
|
302
|
+
font-family: inherit;
|
|
303
|
+
font-size: max(10px, calc(14px * var(--docx-editor-zoom, 1)));
|
|
304
|
+
line-height: inherit;
|
|
305
|
+
text-align: left;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.docx-editor-comment-actions {
|
|
309
|
+
display: flex;
|
|
310
|
+
justify-content: flex-end;
|
|
311
|
+
gap: 6px;
|
|
312
|
+
margin-top: 10px;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.docx-editor-comment-actions button {
|
|
316
|
+
padding: 2px 4px;
|
|
317
|
+
border: 0;
|
|
318
|
+
background: transparent;
|
|
319
|
+
color: #667085;
|
|
320
|
+
cursor: pointer;
|
|
321
|
+
font-size: max(9px, calc(12px * var(--docx-editor-zoom, 1)));
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.docx-editor-comment-actions .docx-editor-comment-primary-action {
|
|
325
|
+
color: #2563eb;
|
|
326
|
+
font-weight: 600;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.docx-editor-comment-composer .docx-editor-comment-actions {
|
|
330
|
+
justify-content: flex-end;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.docx-editor-comment-composer .docx-editor-comment-actions button {
|
|
334
|
+
color: #667085;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.docx-editor-comment-composer
|
|
338
|
+
.docx-editor-comment-actions
|
|
339
|
+
.docx-editor-comment-primary-action {
|
|
340
|
+
color: #2563eb;
|
|
341
|
+
font-weight: 600;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.docx-editor-comment-input {
|
|
345
|
+
box-sizing: border-box;
|
|
346
|
+
width: 100%;
|
|
347
|
+
min-height: 72px;
|
|
348
|
+
resize: vertical;
|
|
349
|
+
padding: 8px;
|
|
350
|
+
border: 1px solid rgb(0 0 0 / 20%);
|
|
351
|
+
border-radius: 5px;
|
|
352
|
+
color: inherit;
|
|
353
|
+
font-family: inherit;
|
|
354
|
+
font-size: max(10px, calc(14px * var(--docx-editor-zoom, 1)));
|
|
355
|
+
line-height: 1.15;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.docx-editor-note-reference {
|
|
359
|
+
padding: 0 1px;
|
|
360
|
+
color: #315da8;
|
|
361
|
+
font-size: 0.72em;
|
|
362
|
+
line-height: 0;
|
|
363
|
+
cursor: help;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.docx-editor-notes {
|
|
367
|
+
box-sizing: border-box;
|
|
368
|
+
margin: 16px auto 24px;
|
|
369
|
+
padding: 18px 24px;
|
|
370
|
+
border-top: 1px solid rgb(0 0 0 / 18%);
|
|
371
|
+
background: #ffffff;
|
|
372
|
+
box-shadow: 0 1px 6px rgb(0 0 0 / 18%);
|
|
373
|
+
color: #242424;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.docx-editor-notes-heading {
|
|
377
|
+
margin: 0 0 10px;
|
|
378
|
+
font-size: 14px;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.docx-editor-notes-list {
|
|
382
|
+
display: flex;
|
|
383
|
+
flex-direction: column;
|
|
384
|
+
gap: 8px;
|
|
385
|
+
padding: 0;
|
|
386
|
+
margin: 0;
|
|
387
|
+
list-style: none;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.docx-editor-notes-list li {
|
|
391
|
+
display: grid;
|
|
392
|
+
grid-template-columns: auto 1fr;
|
|
393
|
+
gap: 10px;
|
|
394
|
+
align-items: baseline;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.docx-editor-note-label {
|
|
398
|
+
color: #315da8;
|
|
399
|
+
font-size: 12px;
|
|
400
|
+
font-weight: 600;
|
|
401
|
+
white-space: nowrap;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.docx-editor-note-body {
|
|
405
|
+
margin: 0;
|
|
406
|
+
white-space: pre-wrap;
|
|
407
|
+
overflow-wrap: anywhere;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/* The fallback for browsers that do not know the two properties above (Safari) */
|
|
411
|
+
.docx-editor-editor::-webkit-scrollbar,
|
|
412
|
+
.docx-editor-comments::-webkit-scrollbar {
|
|
413
|
+
width: 10px;
|
|
414
|
+
height: 10px;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.docx-editor-editor::-webkit-scrollbar-thumb,
|
|
418
|
+
.docx-editor-comments::-webkit-scrollbar-thumb {
|
|
419
|
+
background: #9ba3af;
|
|
420
|
+
background-clip: padding-box;
|
|
421
|
+
border-radius: 5px;
|
|
422
|
+
border: 2px solid transparent;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.docx-editor-editor::-webkit-scrollbar-thumb:hover,
|
|
426
|
+
.docx-editor-comments::-webkit-scrollbar-thumb:hover {
|
|
427
|
+
background: #737d8c;
|
|
428
|
+
background-clip: padding-box;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
.docx-editor-editor::-webkit-scrollbar-track,
|
|
432
|
+
.docx-editor-comments::-webkit-scrollbar-track {
|
|
433
|
+
background: #e7e9ed;
|
|
434
|
+
border-radius: 5px;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
.docx-editor-editor::-webkit-scrollbar-corner,
|
|
438
|
+
.docx-editor-comments::-webkit-scrollbar-corner {
|
|
439
|
+
background: transparent;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
/*
|
|
443
|
+
* The paper and the boundary guides overlaid on it share one positioning origin.
|
|
444
|
+
*
|
|
445
|
+
* The side padding lives here rather than on the scroll box, because Chromium does not
|
|
446
|
+
* draw a scroll box's own padding past the right edge of sideways-scrolled content.
|
|
447
|
+
* Shrink-wrapping puts the padding beyond the paper even then, and min-width keeps the
|
|
448
|
+
* layer filling the box on wide screens so the paper stays centered.
|
|
449
|
+
*/
|
|
450
|
+
.docx-editor-page-layer {
|
|
451
|
+
position: relative;
|
|
452
|
+
width: fit-content;
|
|
453
|
+
min-width: 100%;
|
|
454
|
+
box-sizing: border-box;
|
|
455
|
+
padding: 0 16px;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
@media (max-width: 840px) {
|
|
459
|
+
.docx-editor-comment-meta {
|
|
460
|
+
font-size: max(9px, calc(11px * var(--docx-editor-zoom, 1)));
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.docx-editor-comment-body,
|
|
464
|
+
button.docx-editor-comment-body {
|
|
465
|
+
font-size: max(10px, calc(13px * var(--docx-editor-zoom, 1)));
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.docx-editor-comment-input {
|
|
469
|
+
font-size: max(10px, calc(13px * var(--docx-editor-zoom, 1)));
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.docx-editor-comment-actions button {
|
|
473
|
+
font-size: max(9px, calc(11px * var(--docx-editor-zoom, 1)));
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.docx-editor-comments-heading {
|
|
477
|
+
font-size: max(10px, calc(13px * var(--docx-editor-zoom, 1)));
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
.docx-editor-comments-heading {
|
|
481
|
+
padding: 0 10px;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.docx-editor-comments[data-view="all"] .docx-editor-comments-canvas {
|
|
485
|
+
padding: 10px 12px;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
.docx-editor-comment-card,
|
|
489
|
+
.docx-editor-comment-composer {
|
|
490
|
+
padding: 10px;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
.docx-editor-workspace {
|
|
494
|
+
--docx-editor-comments-width: 240px;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
@media (max-width: 720px) {
|
|
499
|
+
.docx-editor-comment-meta {
|
|
500
|
+
font-size: max(9px, calc(10px * var(--docx-editor-zoom, 1)));
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
.docx-editor-comment-body,
|
|
504
|
+
button.docx-editor-comment-body {
|
|
505
|
+
font-size: max(10px, calc(11px * var(--docx-editor-zoom, 1)));
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.docx-editor-comment-input {
|
|
509
|
+
font-size: max(10px, calc(11px * var(--docx-editor-zoom, 1)));
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
.docx-editor-comment-actions button {
|
|
513
|
+
font-size: max(9px, calc(10px * var(--docx-editor-zoom, 1)));
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
.docx-editor-comments[data-view="all"] .docx-editor-comments-canvas {
|
|
517
|
+
padding: 8px;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
.docx-editor-comment-card,
|
|
521
|
+
.docx-editor-comment-composer {
|
|
522
|
+
padding: 8px;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
.docx-editor-workspace {
|
|
526
|
+
--docx-editor-comments-width: 200px;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
.docx-editor-comment-header {
|
|
530
|
+
flex-direction: column;
|
|
531
|
+
gap: 2px;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
.docx-editor-comments-heading {
|
|
535
|
+
font-size: max(10px, calc(12px * var(--docx-editor-zoom, 1)));
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
@media (max-width: 560px) {
|
|
540
|
+
.docx-editor-comment-header > .docx-editor-comment-meta {
|
|
541
|
+
margin-bottom: 0;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
.docx-editor-comment-icon-actions {
|
|
545
|
+
align-self: flex-start;
|
|
546
|
+
gap: 0;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
.docx-editor-comment-icon-actions button {
|
|
550
|
+
width: 24px;
|
|
551
|
+
height: 24px;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
.docx-editor-comment-icon-actions svg {
|
|
555
|
+
width: 14px;
|
|
556
|
+
height: 14px;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
.docx-editor-comments-heading {
|
|
560
|
+
padding: 0 8px;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
.docx-editor-comments[data-view="all"] .docx-editor-comments-canvas {
|
|
564
|
+
padding: 6px;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
.docx-editor-comment-card,
|
|
568
|
+
.docx-editor-comment-composer {
|
|
569
|
+
padding: 6px;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
.docx-editor-workspace {
|
|
573
|
+
--docx-editor-comments-width: 180px;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
@media (max-width: 420px) {
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
.docx-editor-sheet {
|
|
581
|
+
/*
|
|
582
|
+
* The paper size, and the margins printed inside it.
|
|
583
|
+
*
|
|
584
|
+
* The editor writes all six over these the moment a document is opened, from the
|
|
585
|
+
* `w:pgSz` and `w:pgMar` of its first section (`docx/pageGeometry.ts`), so a Letter
|
|
586
|
+
* document is drawn on Letter. What stands here is the paper a document that names
|
|
587
|
+
* none is drawn on, A4 portrait with the margins this editor has always used, and it
|
|
588
|
+
* is the same paper `A4_PORTRAIT` names in `docx/pageGeometry.ts`.
|
|
589
|
+
*
|
|
590
|
+
* The height is used only as a minimum, so that even short text feels like a full
|
|
591
|
+
* sheet and longer text simply grows it.
|
|
592
|
+
* The body left inside these margins is the width of a new table and the height
|
|
593
|
+
* between page boundaries; `page/pageLayout.ts` works both out from the very same
|
|
594
|
+
* geometry, so the divider on screen lands where the sheet actually ends.
|
|
595
|
+
*/
|
|
596
|
+
--docx-editor-page-width: 21cm;
|
|
597
|
+
--docx-editor-page-height: 29.7cm;
|
|
598
|
+
--docx-editor-page-margin-top: 2cm;
|
|
599
|
+
--docx-editor-page-margin-right: 2.2cm;
|
|
600
|
+
--docx-editor-page-margin-bottom: 2cm;
|
|
601
|
+
--docx-editor-page-margin-left: 2.2cm;
|
|
602
|
+
|
|
603
|
+
box-sizing: border-box;
|
|
604
|
+
/*
|
|
605
|
+
* The paper is never reflowed to fit the editor. Narrow screens may visually scale
|
|
606
|
+
* the whole page layer, which keeps its print line breaks and page boundaries intact.
|
|
607
|
+
*/
|
|
608
|
+
width: var(--docx-editor-page-width);
|
|
609
|
+
/*
|
|
610
|
+
* With the page marks on, the editor supplies a height grown to the number of pages.
|
|
611
|
+
* That way the last page also reads as one whole sheet rather than half of one.
|
|
612
|
+
*/
|
|
613
|
+
min-height: var(--docx-editor-sheet-height, var(--docx-editor-page-height));
|
|
614
|
+
/* Centered while there is room to spare, and flush left once the paper outgrows the box */
|
|
615
|
+
margin: 0 auto;
|
|
616
|
+
padding: var(--docx-editor-page-margin-top)
|
|
617
|
+
var(--docx-editor-page-margin-right) var(--docx-editor-page-margin-bottom)
|
|
618
|
+
var(--docx-editor-page-margin-left);
|
|
619
|
+
background: #ffffff;
|
|
620
|
+
box-shadow: 0 1px 6px rgb(0 0 0 / 18%);
|
|
621
|
+
color: #000000;
|
|
622
|
+
/*
|
|
623
|
+
* These three values are supplied by the editor as CSS variables when a document
|
|
624
|
+
* is opened.
|
|
625
|
+
* What is written here is the bare minimum, used only when those variables are
|
|
626
|
+
* absent.
|
|
627
|
+
* The font list actually laid down is decided by `styles/fontStack.ts`, and the
|
|
628
|
+
* line height multiplier is 1.3 (SINGLE_LINE_RATIO in `styles/inlineStyle.ts`.
|
|
629
|
+
* If one of the two changes, change the other).
|
|
630
|
+
*/
|
|
631
|
+
font-family: var(--docx-editor-font-family, sans-serif);
|
|
632
|
+
font-size: var(--docx-editor-font-size, 10pt);
|
|
633
|
+
line-height: var(--docx-editor-line-height, 1.3);
|
|
634
|
+
outline: none;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
.docx-editor-p {
|
|
638
|
+
margin: 0;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
/*
|
|
642
|
+
* The marks that suggest separate A4 sheets.
|
|
643
|
+
*
|
|
644
|
+
* The text flows straight down one continuous sheet, and only the space between one
|
|
645
|
+
* page and the next is covered by this band so it reads as separate sheets.
|
|
646
|
+
* A block that would straddle the gap has already been pushed to the next page by
|
|
647
|
+
* the editor, so there is no text underneath the band.
|
|
648
|
+
* The mouse passes through this box and reaches the text below.
|
|
649
|
+
*/
|
|
650
|
+
.docx-editor-page-guides {
|
|
651
|
+
position: absolute;
|
|
652
|
+
pointer-events: none;
|
|
653
|
+
user-select: none;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
/*
|
|
657
|
+
* The space between one page and the next.
|
|
658
|
+
* It only breaks the paper with the editor's background color and draws nothing
|
|
659
|
+
* else on top.
|
|
660
|
+
*/
|
|
661
|
+
.docx-editor-page-split {
|
|
662
|
+
position: absolute;
|
|
663
|
+
left: 0;
|
|
664
|
+
right: 0;
|
|
665
|
+
background: #f1f1f1;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
/*
|
|
669
|
+
* A block taller than one page cannot be pushed down, so it crosses the page.
|
|
670
|
+
* At that spot only a faint dotted line is drawn instead of the band, so the text
|
|
671
|
+
* stays uncovered.
|
|
672
|
+
*/
|
|
673
|
+
.docx-editor-page-crossed {
|
|
674
|
+
position: absolute;
|
|
675
|
+
left: 0;
|
|
676
|
+
right: 0;
|
|
677
|
+
border-top: 1px dotted rgb(26 79 208 / 40%);
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
/* The page number. Laid on the top right corner of every page */
|
|
681
|
+
.docx-editor-page-badge {
|
|
682
|
+
position: absolute;
|
|
683
|
+
right: 10px;
|
|
684
|
+
min-width: 18px;
|
|
685
|
+
padding: 0 6px;
|
|
686
|
+
border-radius: 9px;
|
|
687
|
+
background: rgb(0 0 0 / 6%);
|
|
688
|
+
color: #808080;
|
|
689
|
+
font-family: system-ui, sans-serif;
|
|
690
|
+
font-size: 10px;
|
|
691
|
+
line-height: 18px;
|
|
692
|
+
text-align: center;
|
|
693
|
+
letter-spacing: 0.02em;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
/* Display-only projections of the first section's header and footer stories. */
|
|
697
|
+
.docx-editor-page-header,
|
|
698
|
+
.docx-editor-page-footer {
|
|
699
|
+
position: absolute;
|
|
700
|
+
overflow: hidden;
|
|
701
|
+
color: #4d4d4d;
|
|
702
|
+
font-family: var(--docx-editor-font-family, sans-serif);
|
|
703
|
+
font-size: 9pt;
|
|
704
|
+
line-height: 1.2;
|
|
705
|
+
text-align: center;
|
|
706
|
+
white-space: pre-wrap;
|
|
707
|
+
transform: translateY(-50%);
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
/*
|
|
711
|
+
* The list number. Drawn purely from the attribute the decoration supplies.
|
|
712
|
+
* It sits in the paragraph's hanging indent, so the body text lines up against the
|
|
713
|
+
* hanging indent width just as it does in Word.
|
|
714
|
+
*
|
|
715
|
+
* As in Word, the number is flush with the left end of that space, and the body
|
|
716
|
+
* starts where the space ends.
|
|
717
|
+
* The gap between the number and the body therefore opens up as wide as the hanging
|
|
718
|
+
* indent width minus the length of the number.
|
|
719
|
+
* The right padding is the minimum gap, visible only when the number is longer than
|
|
720
|
+
* the space.
|
|
721
|
+
* Because box-sizing is border-box, as long as the number fits inside the space it
|
|
722
|
+
* does not push where the body starts.
|
|
723
|
+
*/
|
|
724
|
+
.docx-editor-p[data-marker]::before {
|
|
725
|
+
content: attr(data-marker);
|
|
726
|
+
display: inline-block;
|
|
727
|
+
box-sizing: border-box;
|
|
728
|
+
min-width: var(--docx-editor-marker-width, 18pt);
|
|
729
|
+
padding-right: 4pt;
|
|
730
|
+
text-align: left;
|
|
731
|
+
/* Keeps the paragraph's hanging indent (text-indent) from being inherited and shifting the number again inside its own box */
|
|
732
|
+
text-indent: 0;
|
|
733
|
+
user-select: none;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
/*
|
|
737
|
+
* Tables.
|
|
738
|
+
* Column widths are set by a colgroup transcribed straight from the document's
|
|
739
|
+
* w:tblGrid, and table-layout holds to those values.
|
|
740
|
+
* Borders are drawn collapsed so that touching edges merge into one.
|
|
741
|
+
*
|
|
742
|
+
* max-width is a safety net for tables that were already saved wider than the body.
|
|
743
|
+
* When the width overruns the paper, the fixed layout shrinks the column widths
|
|
744
|
+
* proportionally to fit them inside it.
|
|
745
|
+
* Growth caused by editing a table is prevented on the model side (the grid and the
|
|
746
|
+
* dxa widths).
|
|
747
|
+
*/
|
|
748
|
+
.docx-editor-tbl {
|
|
749
|
+
border-collapse: collapse;
|
|
750
|
+
table-layout: fixed;
|
|
751
|
+
max-width: 100%;
|
|
752
|
+
margin: 0;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
.docx-editor-tbl [data-table-page-space],
|
|
756
|
+
.docx-editor-tbl [data-table-repeated-header] {
|
|
757
|
+
pointer-events: none;
|
|
758
|
+
user-select: none;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
.docx-editor-tbl [data-table-page-space] > td {
|
|
762
|
+
padding: 0;
|
|
763
|
+
border: 0;
|
|
764
|
+
line-height: 0;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
.docx-editor-tc {
|
|
768
|
+
/*
|
|
769
|
+
* Word's default cell padding (0.08 inch), for a document that writes none of its own.
|
|
770
|
+
* A margin the cell (tcMar), the table (tblCellMar) or its table style declares wins over it.
|
|
771
|
+
*/
|
|
772
|
+
padding: 0 5.4pt;
|
|
773
|
+
vertical-align: top;
|
|
774
|
+
/*
|
|
775
|
+
* No clipping.
|
|
776
|
+
* A word longer than the cell wraps instead of overflowing and being cut off.
|
|
777
|
+
* The hanging indent where a list number sits also stays visible inside the cell.
|
|
778
|
+
*/
|
|
779
|
+
overflow-wrap: anywhere;
|
|
780
|
+
overflow: visible;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
/*
|
|
784
|
+
* Over a column boundary the cursor takes the column-resize shape.
|
|
785
|
+
* cursor is inherited, so setting it once on the sheet keeps it showing even over
|
|
786
|
+
* the text inside a cell.
|
|
787
|
+
* The same mark stays attached while dragging, so the cursor does not waver even
|
|
788
|
+
* when the pointer strays off the boundary.
|
|
789
|
+
*/
|
|
790
|
+
.docx-editor-sheet.docx-editor-col-resize {
|
|
791
|
+
cursor: col-resize;
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
.docx-editor-sheet.docx-editor-row-resize {
|
|
795
|
+
cursor: row-resize;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
/*
|
|
799
|
+
* The vertical line that shows where the boundary stands while it is being dragged.
|
|
800
|
+
* It is floated fixed to the viewport so neither the paper nor the scroll box can
|
|
801
|
+
* clip it, and it is drawn above everything on screen.
|
|
802
|
+
* It must not intercept mouse events, so it is a box that only draws.
|
|
803
|
+
*/
|
|
804
|
+
.docx-editor-col-guide {
|
|
805
|
+
position: fixed;
|
|
806
|
+
z-index: 10;
|
|
807
|
+
width: 0;
|
|
808
|
+
border-left: 1px dashed #1a4fd0;
|
|
809
|
+
pointer-events: none;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
.docx-editor-row-guide {
|
|
813
|
+
position: fixed;
|
|
814
|
+
z-index: 10;
|
|
815
|
+
height: 0;
|
|
816
|
+
border-top: 1px dashed #1a4fd0;
|
|
817
|
+
pointer-events: none;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
/* Selecting a cell lays a faint color over it. The text color is left untouched */
|
|
821
|
+
.docx-editor-tc.selectedCell {
|
|
822
|
+
position: relative;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
.docx-editor-tc.selectedCell::after {
|
|
826
|
+
content: "";
|
|
827
|
+
position: absolute;
|
|
828
|
+
inset: 0;
|
|
829
|
+
background: rgb(120 150 255 / 22%);
|
|
830
|
+
pointer-events: none;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
.docx-editor-tab {
|
|
834
|
+
display: inline;
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
.docx-editor-tab-slot[data-tab-layout] {
|
|
838
|
+
display: inline-block;
|
|
839
|
+
width: var(--docx-editor-tab-width);
|
|
840
|
+
/* The tab glyph must not paint its selection beyond the resolved OOXML slot. */
|
|
841
|
+
overflow: clip;
|
|
842
|
+
white-space: pre;
|
|
843
|
+
vertical-align: baseline;
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
.docx-editor-sheet.docx-editor-tab-caret-active,
|
|
847
|
+
.docx-editor-sheet.docx-editor-tab-caret-active * {
|
|
848
|
+
caret-color: transparent;
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
.docx-editor-tab-caret {
|
|
852
|
+
position: fixed;
|
|
853
|
+
z-index: 20;
|
|
854
|
+
width: 1px;
|
|
855
|
+
background: currentcolor;
|
|
856
|
+
pointer-events: none;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
/*
|
|
860
|
+
* An inline image. It is drawn at the size the drawing records, carried on the width and
|
|
861
|
+
* height attributes, but never wider than the paper it sits on.
|
|
862
|
+
*/
|
|
863
|
+
.docx-editor-img {
|
|
864
|
+
max-width: 100%;
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
/*
|
|
868
|
+
* The box the image is drawn inside (`editor/imageResize.ts`).
|
|
869
|
+
* It is the origin the corner handles are positioned against, and it takes up exactly as
|
|
870
|
+
* much room as the image: no line box of its own opens up underneath it.
|
|
871
|
+
*/
|
|
872
|
+
.docx-editor-img-box {
|
|
873
|
+
position: relative;
|
|
874
|
+
display: inline-block;
|
|
875
|
+
max-width: 100%;
|
|
876
|
+
line-height: 0;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
/* The image is the selection. The frame stands in for ProseMirror's own selected-node mark */
|
|
880
|
+
.docx-editor-img-selected .docx-editor-img {
|
|
881
|
+
outline: 2px solid #1a4fd0;
|
|
882
|
+
outline-offset: 1px;
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
/*
|
|
886
|
+
* The corner handles.
|
|
887
|
+
* They show only while the image is selected, and they straddle the corner so that even a
|
|
888
|
+
* small image can be grabbed.
|
|
889
|
+
*/
|
|
890
|
+
.docx-editor-img-handle {
|
|
891
|
+
position: absolute;
|
|
892
|
+
display: none;
|
|
893
|
+
width: 9px;
|
|
894
|
+
height: 9px;
|
|
895
|
+
border: 1px solid #ffffff;
|
|
896
|
+
border-radius: 2px;
|
|
897
|
+
background: #1a4fd0;
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
.docx-editor-img-selected .docx-editor-img-handle {
|
|
901
|
+
display: block;
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
.docx-editor-img-handle[data-corner="nw"] {
|
|
905
|
+
top: -5px;
|
|
906
|
+
left: -5px;
|
|
907
|
+
cursor: nwse-resize;
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
.docx-editor-img-handle[data-corner="ne"] {
|
|
911
|
+
top: -5px;
|
|
912
|
+
right: -5px;
|
|
913
|
+
cursor: nesw-resize;
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
.docx-editor-img-handle[data-corner="sw"] {
|
|
917
|
+
bottom: -5px;
|
|
918
|
+
left: -5px;
|
|
919
|
+
cursor: nesw-resize;
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
.docx-editor-img-handle[data-corner="se"] {
|
|
923
|
+
bottom: -5px;
|
|
924
|
+
right: -5px;
|
|
925
|
+
cursor: nwse-resize;
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
/*
|
|
929
|
+
* A stretch of text a hyperlink covers. It is drawn as a link and nothing more: the address is
|
|
930
|
+
* held as data rather than as an `href`, so a click here places the caret the way a click on any
|
|
931
|
+
* other text does, and opening the address is the link panel's business.
|
|
932
|
+
* A color the run itself carries paints over this one, the same as any other run formatting.
|
|
933
|
+
*/
|
|
934
|
+
.docx-editor-link {
|
|
935
|
+
color: #1a56db;
|
|
936
|
+
border-bottom: 1px solid currentcolor;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
/*
|
|
940
|
+
* A content control that says its contents may not be edited (`editor/plugins/lockedContent` refuses
|
|
941
|
+
* the edits). Yellow is what the contract templates already paint their settled parts with.
|
|
942
|
+
* A background the run itself carries (`w:shd`, a highlight) paints over this one, so the
|
|
943
|
+
* outline is drawn as well: outlines go on last, whatever the content paints.
|
|
944
|
+
*/
|
|
945
|
+
.docx-editor-sdt-locked {
|
|
946
|
+
background: #fff59d;
|
|
947
|
+
outline: 1px solid #f9a825;
|
|
948
|
+
cursor: not-allowed;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
/*
|
|
952
|
+
* A whole cell shut by the control around it. The same yellow, outlined just inside the cell
|
|
953
|
+
* border so the mark follows the cell rather than the text standing in it.
|
|
954
|
+
*/
|
|
955
|
+
.docx-editor-tc-locked {
|
|
956
|
+
background: #fff59d;
|
|
957
|
+
outline: 1px solid #f9a825;
|
|
958
|
+
outline-offset: -1px;
|
|
959
|
+
cursor: not-allowed;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
/* Elements that, like bookmarks, must not be visible */
|
|
963
|
+
.docx-editor-raw-inline {
|
|
964
|
+
display: inline-block;
|
|
965
|
+
width: 0;
|
|
966
|
+
overflow: hidden;
|
|
967
|
+
vertical-align: baseline;
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
.docx-editor-table,
|
|
971
|
+
.docx-editor-raw-block {
|
|
972
|
+
margin: 8pt 0;
|
|
973
|
+
padding: 10pt 12pt;
|
|
974
|
+
border: 1px dashed #9a9a9a;
|
|
975
|
+
border-radius: 4px;
|
|
976
|
+
background: #fafafa;
|
|
977
|
+
color: #595959;
|
|
978
|
+
font-size: 9pt;
|
|
979
|
+
font-family: system-ui, sans-serif;
|
|
980
|
+
user-select: none;
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
/*
|
|
984
|
+
* The toolbar.
|
|
985
|
+
*
|
|
986
|
+
* It is fixed in place in the frame's first slot, and only the paper box below it
|
|
987
|
+
* scrolls.
|
|
988
|
+
* sticky is applied as well so that it stays at the top even on screens where the
|
|
989
|
+
* frame has no height and the page scrolls instead.
|
|
990
|
+
*
|
|
991
|
+
* The whole toolbar is one stacking layer, so a panel opened from it can never rise
|
|
992
|
+
* above what the toolbar itself is under. That is why the value here, and not the one
|
|
993
|
+
* on the panel, is what decides whether an open palette covers the paper.
|
|
994
|
+
* The order across the editor is: paper and its page marks, then the toolbar, then the
|
|
995
|
+
* boundary being dragged, and the table menu on top of everything.
|
|
996
|
+
* Inside the toolbar's own layer, a tooltip (15) rises over the rows of controls and an
|
|
997
|
+
* open panel (20) rises over the tooltip.
|
|
998
|
+
*/
|
|
999
|
+
.docx-editor-toolbar {
|
|
1000
|
+
position: sticky;
|
|
1001
|
+
top: 0;
|
|
1002
|
+
z-index: 5;
|
|
1003
|
+
display: flex;
|
|
1004
|
+
flex-wrap: wrap;
|
|
1005
|
+
align-items: center;
|
|
1006
|
+
/* Wrapped rows get a touch more air than the buttons within one */
|
|
1007
|
+
gap: 4px 2px;
|
|
1008
|
+
flex: none;
|
|
1009
|
+
padding: 6px 8px;
|
|
1010
|
+
border-bottom: 1px solid #d8d8d8;
|
|
1011
|
+
background: #ffffff;
|
|
1012
|
+
font-size: 13px;
|
|
1013
|
+
color: #1f1f1f;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
.docx-editor-toolbar-group {
|
|
1017
|
+
display: flex;
|
|
1018
|
+
align-items: center;
|
|
1019
|
+
gap: 2px;
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
.docx-editor-toolbar-sep {
|
|
1023
|
+
width: 1px;
|
|
1024
|
+
height: 20px;
|
|
1025
|
+
margin: 0 6px;
|
|
1026
|
+
background: #dcdcdc;
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
.docx-editor-toolbar-btn {
|
|
1030
|
+
display: inline-flex;
|
|
1031
|
+
align-items: center;
|
|
1032
|
+
justify-content: center;
|
|
1033
|
+
width: 28px;
|
|
1034
|
+
height: 28px;
|
|
1035
|
+
padding: 0;
|
|
1036
|
+
border: 1px solid transparent;
|
|
1037
|
+
border-radius: 4px;
|
|
1038
|
+
background: transparent;
|
|
1039
|
+
color: inherit;
|
|
1040
|
+
cursor: pointer;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
.docx-editor-toolbar-btn:hover:not(:disabled) {
|
|
1044
|
+
background: #f0f0f0;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
.docx-editor-toolbar-btn[aria-pressed="true"],
|
|
1048
|
+
.docx-editor-toolbar-btn[aria-expanded="true"] {
|
|
1049
|
+
border-color: #c3d4f5;
|
|
1050
|
+
background: #e4ecfd;
|
|
1051
|
+
color: #1a4fd0;
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
.docx-editor-toolbar-btn:disabled {
|
|
1055
|
+
opacity: 0.35;
|
|
1056
|
+
cursor: default;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
.docx-editor-toolbar-color-icon {
|
|
1060
|
+
position: relative;
|
|
1061
|
+
display: inline-flex;
|
|
1062
|
+
width: 16px;
|
|
1063
|
+
height: 16px;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
.docx-editor-toolbar-color-indicator {
|
|
1067
|
+
position: absolute;
|
|
1068
|
+
right: 1px;
|
|
1069
|
+
bottom: 0;
|
|
1070
|
+
left: 1px;
|
|
1071
|
+
height: 4px;
|
|
1072
|
+
border-radius: 1px;
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
.docx-editor-toolbar-select {
|
|
1076
|
+
height: 28px;
|
|
1077
|
+
padding: 0 4px;
|
|
1078
|
+
border: 1px solid #dcdcdc;
|
|
1079
|
+
border-radius: 4px;
|
|
1080
|
+
background: #ffffff;
|
|
1081
|
+
color: inherit;
|
|
1082
|
+
font: inherit;
|
|
1083
|
+
cursor: pointer;
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
.docx-editor-font-family-select {
|
|
1087
|
+
box-sizing: border-box;
|
|
1088
|
+
flex: 0 0 112px;
|
|
1089
|
+
width: 112px;
|
|
1090
|
+
min-width: 0;
|
|
1091
|
+
max-width: 112px;
|
|
1092
|
+
overflow: hidden;
|
|
1093
|
+
text-overflow: ellipsis;
|
|
1094
|
+
white-space: nowrap;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
/*
|
|
1098
|
+
* The tooltip a control shows on hover.
|
|
1099
|
+
*
|
|
1100
|
+
* The text is carried by the attribute (`tooltip` in `styles/classNames.ts`) and drawn
|
|
1101
|
+
* from it by this pseudo-element, so no script runs and nothing is measured: the box
|
|
1102
|
+
* simply hangs under the middle of the control.
|
|
1103
|
+
* The native `title` attribute is not used, because how long it waits belongs to the
|
|
1104
|
+
* browser (about a second) and cannot be shortened.
|
|
1105
|
+
*
|
|
1106
|
+
* Nothing on the way out clips it. The toolbar and the panels never hide their overflow,
|
|
1107
|
+
* and the box that scrolls is the paper's, which no tooltip is inside; the tooltip only
|
|
1108
|
+
* hangs over the paper.
|
|
1109
|
+
* Inside the toolbar's layer it is drawn under an open panel (20), because a panel opens
|
|
1110
|
+
* over the very spot the tooltip hangs in.
|
|
1111
|
+
*/
|
|
1112
|
+
[data-docx-editor-tooltip] {
|
|
1113
|
+
position: relative;
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
[data-docx-editor-tooltip]::after {
|
|
1117
|
+
content: attr(data-docx-editor-tooltip);
|
|
1118
|
+
position: absolute;
|
|
1119
|
+
z-index: 15;
|
|
1120
|
+
top: calc(100% + 6px);
|
|
1121
|
+
left: 50%;
|
|
1122
|
+
width: max-content;
|
|
1123
|
+
max-width: 220px;
|
|
1124
|
+
/* An address has no space to break at, so it may break anywhere rather than run out of the box */
|
|
1125
|
+
overflow-wrap: anywhere;
|
|
1126
|
+
padding: 4px 7px;
|
|
1127
|
+
border-radius: 4px;
|
|
1128
|
+
background: #3c4043;
|
|
1129
|
+
color: #ffffff;
|
|
1130
|
+
font-family: system-ui, sans-serif;
|
|
1131
|
+
font-size: 11px;
|
|
1132
|
+
line-height: 1.45;
|
|
1133
|
+
text-align: center;
|
|
1134
|
+
transform: translateX(-50%);
|
|
1135
|
+
opacity: 0;
|
|
1136
|
+
visibility: hidden;
|
|
1137
|
+
/* The hidden state carries no delay, so leaving the control takes the tooltip away at once */
|
|
1138
|
+
transition:
|
|
1139
|
+
opacity 0s,
|
|
1140
|
+
visibility 0s;
|
|
1141
|
+
pointer-events: none;
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
/*
|
|
1145
|
+
* The wait before it shows. The delay lives here, on the shown state alone.
|
|
1146
|
+
* Keyboard focus waits the same 300ms as the pointer: `:focus-visible` for a control that
|
|
1147
|
+
* carries its own tooltip, and the `:has` line for a select, whose tooltip is on the box
|
|
1148
|
+
* around it. Focus taken by a click does not count, so clicking a button does not leave a
|
|
1149
|
+
* tooltip standing behind the panel it just opened.
|
|
1150
|
+
*/
|
|
1151
|
+
[data-docx-editor-tooltip]:hover::after,
|
|
1152
|
+
[data-docx-editor-tooltip]:focus-visible::after,
|
|
1153
|
+
[data-docx-editor-tooltip]:has(:focus-visible)::after {
|
|
1154
|
+
opacity: 1;
|
|
1155
|
+
visibility: visible;
|
|
1156
|
+
transition:
|
|
1157
|
+
opacity 90ms linear 300ms,
|
|
1158
|
+
visibility 0s linear 300ms;
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
/*
|
|
1162
|
+
* A control holding its panel open shows no tooltip at all.
|
|
1163
|
+
* The panel opens in the same place the tooltip hangs, and the pointer is still resting on
|
|
1164
|
+
* the control that opened it, so the tooltip would otherwise sit right against the panel it
|
|
1165
|
+
* has just been made redundant by. Being drawn under the panel is not enough: the tooltip is
|
|
1166
|
+
* centered on the control while the panel lines up with the control's edge, so a sliver of it
|
|
1167
|
+
* would stick out.
|
|
1168
|
+
*/
|
|
1169
|
+
[data-docx-editor-tooltip][aria-expanded="true"]::after {
|
|
1170
|
+
content: none;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
/*
|
|
1174
|
+
* Escape takes away the tooltip standing in the way, without the pointer having to be moved off
|
|
1175
|
+
* the control it belongs to (WCAG 1.4.13). The mark is put on the box the tooltips are drawn
|
|
1176
|
+
* inside and taken off again by the next move of the pointer or of the focus
|
|
1177
|
+
* (`ui/Tooltip.tsx`), so nothing stays hushed beyond the moment it was in the way.
|
|
1178
|
+
*/
|
|
1179
|
+
[data-docx-editor-tooltips-off] [data-docx-editor-tooltip]::after {
|
|
1180
|
+
content: none;
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
/* The box around a control that draws no pseudo-elements of its own. It takes up no more room than the control inside it */
|
|
1184
|
+
.docx-editor-tooltip-wrap {
|
|
1185
|
+
display: inline-flex;
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
/*
|
|
1189
|
+
* The small panel that opens below a button.
|
|
1190
|
+
*
|
|
1191
|
+
* It hangs out of the toolbar over the paper, so it has to cover the toolbar's own rows
|
|
1192
|
+
* as well as the buttons beside it. How it stands against the paper is decided by the
|
|
1193
|
+
* toolbar's own layer.
|
|
1194
|
+
*
|
|
1195
|
+
* The panel is laid out against the screen rather than against the button, and
|
|
1196
|
+
* `ui/panelPlacement.ts` writes the place onto it. Being positioned inside the editor was
|
|
1197
|
+
* not enough: the boxes around the editor belong to the host app, and any one of them
|
|
1198
|
+
* hiding its overflow - which a library cannot forbid - cut off every panel that reached
|
|
1199
|
+
* past its edge, however high the panel was stacked. Nothing but the screen clips a fixed
|
|
1200
|
+
* box.
|
|
1201
|
+
* That is also why the box holding the button and the panel needs no style of its own: it
|
|
1202
|
+
* is only what tells a click apart from a click outside the panel.
|
|
1203
|
+
* The values here are only where the panel sits for the one render it spends being
|
|
1204
|
+
* measured, and they keep it away from the right edge of the screen so that the width it
|
|
1205
|
+
* measures is the width it wants.
|
|
1206
|
+
*/
|
|
1207
|
+
.docx-editor-popover {
|
|
1208
|
+
position: fixed;
|
|
1209
|
+
z-index: 20;
|
|
1210
|
+
top: 0;
|
|
1211
|
+
left: 0;
|
|
1212
|
+
box-sizing: border-box;
|
|
1213
|
+
max-width: calc(100vw - 16px);
|
|
1214
|
+
max-height: calc(100vh - 16px);
|
|
1215
|
+
overflow: auto;
|
|
1216
|
+
padding: 8px;
|
|
1217
|
+
border: 1px solid #d8d8d8;
|
|
1218
|
+
border-radius: 6px;
|
|
1219
|
+
background: #ffffff;
|
|
1220
|
+
box-shadow: 0 4px 14px rgb(0 0 0 / 16%);
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
/* The clear entry at the top of the palette. Set a little apart from the swatches */
|
|
1224
|
+
.docx-editor-color-clear-row {
|
|
1225
|
+
margin-bottom: 6px;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
/*
|
|
1229
|
+
* The two grids are laid out row by row rather than as one run of cells, because the rows are in
|
|
1230
|
+
* the markup: a grid says what it is to a screen reader and to the arrow keys that walk it
|
|
1231
|
+
* (`ui/useGridKeyboard.ts`), and a row of it has to be a box of its own to be one.
|
|
1232
|
+
*/
|
|
1233
|
+
.docx-editor-size-grid {
|
|
1234
|
+
display: flex;
|
|
1235
|
+
flex-direction: column;
|
|
1236
|
+
gap: 2px;
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
.docx-editor-size-row {
|
|
1240
|
+
display: grid;
|
|
1241
|
+
grid-template-columns: repeat(6, 18px);
|
|
1242
|
+
gap: 2px;
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
.docx-editor-size-cell {
|
|
1246
|
+
width: 18px;
|
|
1247
|
+
height: 18px;
|
|
1248
|
+
padding: 0;
|
|
1249
|
+
border: 1px solid #cfcfcf;
|
|
1250
|
+
border-radius: 2px;
|
|
1251
|
+
background: #ffffff;
|
|
1252
|
+
cursor: pointer;
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
.docx-editor-size-cell[data-on] {
|
|
1256
|
+
border-color: #1a4fd0;
|
|
1257
|
+
background: #dbe6fd;
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
.docx-editor-size-label {
|
|
1261
|
+
margin: 6px 0 0;
|
|
1262
|
+
text-align: center;
|
|
1263
|
+
font-size: 12px;
|
|
1264
|
+
color: #5a5a5a;
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
.docx-editor-color-grid {
|
|
1268
|
+
display: flex;
|
|
1269
|
+
flex-direction: column;
|
|
1270
|
+
gap: 3px;
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
.docx-editor-color-picker {
|
|
1274
|
+
min-width: 207px;
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
/* The text color palette. The same position down a column is the same family, so the column count has to be kept for the layout to mean anything */
|
|
1278
|
+
.docx-editor-color-row {
|
|
1279
|
+
display: grid;
|
|
1280
|
+
grid-template-columns: repeat(10, 18px);
|
|
1281
|
+
gap: 3px;
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
.docx-editor-swatch {
|
|
1285
|
+
width: 18px;
|
|
1286
|
+
height: 18px;
|
|
1287
|
+
padding: 0;
|
|
1288
|
+
border: 1px solid rgb(0 0 0 / 25%);
|
|
1289
|
+
border-radius: 3px;
|
|
1290
|
+
cursor: pointer;
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
/* One color is in force at a time, so the swatch holding it is the selected cell of the grid */
|
|
1294
|
+
.docx-editor-swatch[aria-selected="true"] {
|
|
1295
|
+
outline: 2px solid #1a4fd0;
|
|
1296
|
+
outline-offset: 1px;
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
.docx-editor-color-custom {
|
|
1300
|
+
display: grid;
|
|
1301
|
+
grid-template-columns: 30px 82px 28px;
|
|
1302
|
+
gap: 6px;
|
|
1303
|
+
margin-top: 8px;
|
|
1304
|
+
padding-top: 8px;
|
|
1305
|
+
border-top: 1px solid #e2e2e2;
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
.docx-editor-color-native-input {
|
|
1309
|
+
box-sizing: border-box;
|
|
1310
|
+
width: 30px;
|
|
1311
|
+
height: 28px;
|
|
1312
|
+
padding: 2px;
|
|
1313
|
+
border: 1px solid #c8c8c8;
|
|
1314
|
+
border-radius: 4px;
|
|
1315
|
+
background: #ffffff;
|
|
1316
|
+
cursor: pointer;
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
.docx-editor-color-hex-input {
|
|
1320
|
+
box-sizing: border-box;
|
|
1321
|
+
min-width: 0;
|
|
1322
|
+
height: 28px;
|
|
1323
|
+
padding: 4px 6px;
|
|
1324
|
+
border: 1px solid #c8c8c8;
|
|
1325
|
+
border-radius: 4px;
|
|
1326
|
+
font: inherit;
|
|
1327
|
+
font-size: 12px;
|
|
1328
|
+
color: #1f1f1f;
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
.docx-editor-color-hex-input[aria-invalid="true"] {
|
|
1332
|
+
border-color: #c5221f;
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
.docx-editor-color-apply:disabled {
|
|
1336
|
+
color: #9a9a9a;
|
|
1337
|
+
cursor: default;
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
/*
|
|
1341
|
+
* The table menu opened with the right button. Where it overlaps the toolbar or an open
|
|
1342
|
+
* panel, the menu is on top.
|
|
1343
|
+
* Like the toolbar panels it is laid out against the screen, so that no box the host app
|
|
1344
|
+
* wraps the editor in can cut it off; `ui/panelPlacement.ts` writes the place onto it.
|
|
1345
|
+
*/
|
|
1346
|
+
.docx-editor-menu {
|
|
1347
|
+
position: fixed;
|
|
1348
|
+
z-index: 30;
|
|
1349
|
+
top: 0;
|
|
1350
|
+
left: 0;
|
|
1351
|
+
box-sizing: border-box;
|
|
1352
|
+
min-width: min(180px, calc(100vw - 16px));
|
|
1353
|
+
max-width: calc(100vw - 16px);
|
|
1354
|
+
max-height: calc(100vh - 16px);
|
|
1355
|
+
overflow: auto;
|
|
1356
|
+
padding: 4px;
|
|
1357
|
+
border: 1px solid #d8d8d8;
|
|
1358
|
+
border-radius: 6px;
|
|
1359
|
+
background: #ffffff;
|
|
1360
|
+
box-shadow: 0 6px 18px rgb(0 0 0 / 18%);
|
|
1361
|
+
font-family: system-ui, sans-serif;
|
|
1362
|
+
font-size: 13px;
|
|
1363
|
+
color: #1f1f1f;
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
/*
|
|
1367
|
+
* The link panel. Laid out against the screen like the menus, since it opens over the selection
|
|
1368
|
+
* rather than inside any box of the editor's (`ui/panelPlacement.ts`).
|
|
1369
|
+
*/
|
|
1370
|
+
.docx-editor-link-panel {
|
|
1371
|
+
position: fixed;
|
|
1372
|
+
z-index: 30;
|
|
1373
|
+
top: 0;
|
|
1374
|
+
left: 0;
|
|
1375
|
+
box-sizing: border-box;
|
|
1376
|
+
display: flex;
|
|
1377
|
+
flex-direction: column;
|
|
1378
|
+
gap: 8px;
|
|
1379
|
+
width: 260px;
|
|
1380
|
+
max-width: calc(100vw - 16px);
|
|
1381
|
+
max-height: calc(100vh - 16px);
|
|
1382
|
+
overflow: auto;
|
|
1383
|
+
padding: 6px;
|
|
1384
|
+
border: 1px solid #d8d8d8;
|
|
1385
|
+
border-radius: 6px;
|
|
1386
|
+
background: #ffffff;
|
|
1387
|
+
box-shadow: 0 6px 18px rgb(0 0 0 / 18%);
|
|
1388
|
+
font-family: system-ui, sans-serif;
|
|
1389
|
+
font-size: 13px;
|
|
1390
|
+
color: #1f1f1f;
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
.docx-editor-link-address {
|
|
1394
|
+
width: 100%;
|
|
1395
|
+
/* Sits no taller than the 28px buttons beside it, so the row is as low as they allow */
|
|
1396
|
+
padding: 4px 8px;
|
|
1397
|
+
border: 1px solid #c4c4c4;
|
|
1398
|
+
border-radius: 4px;
|
|
1399
|
+
font: inherit;
|
|
1400
|
+
color: inherit;
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
.docx-editor-link-row {
|
|
1404
|
+
display: flex;
|
|
1405
|
+
gap: 8px;
|
|
1406
|
+
align-items: center;
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
/* Says what the field is for, since the panel has no title of its own */
|
|
1410
|
+
.docx-editor-link-icon {
|
|
1411
|
+
flex: none;
|
|
1412
|
+
color: #5f6368;
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
.docx-editor-link-row .docx-editor-link-address {
|
|
1416
|
+
flex: 1;
|
|
1417
|
+
min-width: 0;
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
/*
|
|
1421
|
+
* The card that says where the link under the cursor points. Laid out against the screen like the
|
|
1422
|
+
* link panel, and hung under the first line of the link itself (`ui/LinkCard.tsx`).
|
|
1423
|
+
*/
|
|
1424
|
+
.docx-editor-link-card {
|
|
1425
|
+
position: fixed;
|
|
1426
|
+
z-index: 30;
|
|
1427
|
+
top: 0;
|
|
1428
|
+
left: 0;
|
|
1429
|
+
box-sizing: border-box;
|
|
1430
|
+
display: flex;
|
|
1431
|
+
align-items: center;
|
|
1432
|
+
gap: 6px;
|
|
1433
|
+
max-width: min(540px, calc(100vw - 16px));
|
|
1434
|
+
overflow: visible;
|
|
1435
|
+
padding: 5px 6px;
|
|
1436
|
+
border: 1px solid #d8d8d8;
|
|
1437
|
+
border-radius: 6px;
|
|
1438
|
+
background: #ffffff;
|
|
1439
|
+
box-shadow: 0 6px 18px rgb(0 0 0 / 18%);
|
|
1440
|
+
font-family: system-ui, sans-serif;
|
|
1441
|
+
font-size: 13px;
|
|
1442
|
+
color: #1f1f1f;
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
/* The whole of the address is in the tooltip, so the visible end of a long one is cut off */
|
|
1446
|
+
.docx-editor-link-card-address {
|
|
1447
|
+
box-sizing: border-box;
|
|
1448
|
+
display: block;
|
|
1449
|
+
width: 100%;
|
|
1450
|
+
padding: 0 2px;
|
|
1451
|
+
overflow: hidden;
|
|
1452
|
+
white-space: nowrap;
|
|
1453
|
+
text-overflow: ellipsis;
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
.docx-editor-link-card > .docx-editor-tooltip-wrap {
|
|
1457
|
+
flex: 0 1 160px;
|
|
1458
|
+
min-width: 0;
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1461
|
+
.docx-editor-link-card > .docx-editor-toolbar-btn {
|
|
1462
|
+
flex: none;
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
.docx-editor-link-card-note {
|
|
1466
|
+
max-width: 260px;
|
|
1467
|
+
padding: 0 2px;
|
|
1468
|
+
color: #5f6368;
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1471
|
+
/*
|
|
1472
|
+
* A menu of choices inside a toolbar panel (line spacing, alignment).
|
|
1473
|
+
* The rows carry the width; the panel is only the box drawn around them.
|
|
1474
|
+
*/
|
|
1475
|
+
.docx-editor-menu-list {
|
|
1476
|
+
min-width: 190px;
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
/*
|
|
1480
|
+
* A menu row. The check slot and an icon sit in front of the label, so the row is laid out
|
|
1481
|
+
* in a line rather than as a block of text.
|
|
1482
|
+
*/
|
|
1483
|
+
.docx-editor-menu-item {
|
|
1484
|
+
display: flex;
|
|
1485
|
+
align-items: center;
|
|
1486
|
+
gap: 8px;
|
|
1487
|
+
width: 100%;
|
|
1488
|
+
padding: 6px 10px;
|
|
1489
|
+
border: none;
|
|
1490
|
+
border-radius: 4px;
|
|
1491
|
+
background: transparent;
|
|
1492
|
+
color: inherit;
|
|
1493
|
+
font: inherit;
|
|
1494
|
+
text-align: left;
|
|
1495
|
+
cursor: pointer;
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1498
|
+
.docx-editor-menu-item:hover:not([aria-disabled="true"]) {
|
|
1499
|
+
background: #f0f4ff;
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
/*
|
|
1503
|
+
* A row with nothing to do. It says so in ARIA rather than being disabled outright, so that it
|
|
1504
|
+
* stays focusable and a keyboard walking the menu is told what is there and why it is dead
|
|
1505
|
+
* instead of walking past a row it never hears about.
|
|
1506
|
+
*/
|
|
1507
|
+
.docx-editor-menu-item[aria-disabled="true"] {
|
|
1508
|
+
opacity: 0.4;
|
|
1509
|
+
cursor: default;
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
/* The check mark of the current choice. The slot is always there, so the labels line up whether a row is checked or not */
|
|
1513
|
+
.docx-editor-menu-check {
|
|
1514
|
+
display: inline-flex;
|
|
1515
|
+
flex: none;
|
|
1516
|
+
width: 16px;
|
|
1517
|
+
color: #1a4fd0;
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
/*
|
|
1521
|
+
* The shortcut written on the right of a menu row. It pushes itself to the far edge, so the
|
|
1522
|
+
* labels on the left stay lined up however long a shortcut is.
|
|
1523
|
+
*/
|
|
1524
|
+
.docx-editor-menu-hint {
|
|
1525
|
+
margin-left: auto;
|
|
1526
|
+
padding-left: 16px;
|
|
1527
|
+
color: #757575;
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
.docx-editor-menu-sep {
|
|
1531
|
+
height: 0;
|
|
1532
|
+
margin: 4px 6px;
|
|
1533
|
+
border: none;
|
|
1534
|
+
border-top: 1px solid #e6e6e6;
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
@media (max-width: 720px) {
|
|
1538
|
+
.docx-editor-popover,
|
|
1539
|
+
.docx-editor-menu,
|
|
1540
|
+
.docx-editor-link-panel,
|
|
1541
|
+
.docx-editor-link-card {
|
|
1542
|
+
font-size: 12px;
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
.docx-editor-popover {
|
|
1546
|
+
padding: 6px;
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
.docx-editor-menu {
|
|
1550
|
+
min-width: min(168px, calc(100vw - 16px));
|
|
1551
|
+
padding: 3px;
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
.docx-editor-menu-list {
|
|
1555
|
+
min-width: 168px;
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
.docx-editor-menu-item {
|
|
1559
|
+
min-height: 26px;
|
|
1560
|
+
gap: 6px;
|
|
1561
|
+
padding: 5px 8px;
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1564
|
+
.docx-editor-menu-item > svg {
|
|
1565
|
+
width: 14px;
|
|
1566
|
+
height: 14px;
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
.docx-editor-menu-check {
|
|
1570
|
+
width: 14px;
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1573
|
+
.docx-editor-menu-hint {
|
|
1574
|
+
padding-left: 10px;
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
@media (max-width: 560px) {
|
|
1579
|
+
.docx-editor-popover,
|
|
1580
|
+
.docx-editor-menu,
|
|
1581
|
+
.docx-editor-link-panel,
|
|
1582
|
+
.docx-editor-link-card {
|
|
1583
|
+
font-size: 11px;
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
.docx-editor-menu {
|
|
1587
|
+
min-width: min(152px, calc(100vw - 16px));
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
.docx-editor-menu-list {
|
|
1591
|
+
min-width: 152px;
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
.docx-editor-menu-item {
|
|
1595
|
+
min-height: 24px;
|
|
1596
|
+
gap: 5px;
|
|
1597
|
+
padding: 4px 6px;
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
.docx-editor-menu-item > svg {
|
|
1601
|
+
width: 13px;
|
|
1602
|
+
height: 13px;
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
.docx-editor-menu-check {
|
|
1606
|
+
width: 13px;
|
|
1607
|
+
}
|
|
1608
|
+
|
|
1609
|
+
.docx-editor-menu-hint {
|
|
1610
|
+
padding-left: 8px;
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
.docx-editor-link-panel {
|
|
1614
|
+
gap: 6px;
|
|
1615
|
+
width: 220px;
|
|
1616
|
+
padding: 5px;
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
.docx-editor-link-card {
|
|
1620
|
+
gap: 4px;
|
|
1621
|
+
}
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
/*
|
|
1625
|
+
* The panel that stands where the editor would have been, for a document that was refused
|
|
1626
|
+
* and a consumer that wrote no panel of its own.
|
|
1627
|
+
* Plain and quiet on purpose: it carries a reason, not a design.
|
|
1628
|
+
*/
|
|
1629
|
+
.docx-editor-rejection {
|
|
1630
|
+
display: flex;
|
|
1631
|
+
flex-direction: column;
|
|
1632
|
+
gap: 4px;
|
|
1633
|
+
padding: 16px;
|
|
1634
|
+
border: 1px solid #e6c9c9;
|
|
1635
|
+
border-radius: 6px;
|
|
1636
|
+
background: #fdf6f6;
|
|
1637
|
+
color: #7a2b2b;
|
|
1638
|
+
font-family: system-ui, sans-serif;
|
|
1639
|
+
font-size: 14px;
|
|
1640
|
+
line-height: 1.5;
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
.docx-editor-rejection-title {
|
|
1644
|
+
font-weight: 600;
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
/* The panel writes its own spacing, so the paragraph margins of the host stand down */
|
|
1648
|
+
.docx-editor-rejection p {
|
|
1649
|
+
margin: 0;
|
|
1650
|
+
}
|