@atlaskit/editor-core 207.11.1 → 207.12.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 +22 -0
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +2 -2
- package/dist/cjs/ui/EditorContentContainer/styles/list.js +116 -15
- package/dist/cjs/ui/EditorContentContainer/styles/resizerStyles.js +54 -5
- package/dist/cjs/ui/EditorContentContainer/styles/telepointerStyles.js +207 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +7 -5
- package/dist/es2019/ui/EditorContentContainer/styles/list.js +117 -16
- package/dist/es2019/ui/EditorContentContainer/styles/resizerStyles.js +54 -5
- package/dist/es2019/ui/EditorContentContainer/styles/telepointerStyles.js +200 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +3 -3
- package/dist/esm/ui/EditorContentContainer/styles/list.js +117 -16
- package/dist/esm/ui/EditorContentContainer/styles/resizerStyles.js +54 -5
- package/dist/esm/ui/EditorContentContainer/styles/telepointerStyles.js +200 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/ui/EditorContentContainer/styles/telepointerStyles.d.ts +3 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/telepointerStyles.d.ts +3 -0
- package/package.json +7 -11
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// eslint-disable-
|
|
2
|
-
|
|
1
|
+
import { css } from '@emotion/react'; // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
2
|
+
|
|
3
3
|
// copied from packages/editor/editor-shared-styles/src/consts/consts.ts
|
|
4
4
|
const akEditorLineHeight = 1.714;
|
|
5
5
|
// copied from packages/editor/editor-common/src/styles/shared/smart-card.ts
|
|
@@ -10,20 +10,121 @@ const blockNodesVerticalMargin = '0.75rem';
|
|
|
10
10
|
|
|
11
11
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
12
12
|
export const listsStyles = css({
|
|
13
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
14
|
-
'.ProseMirror
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
//
|
|
25
|
-
|
|
26
|
-
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
14
|
+
'.ProseMirror': {
|
|
15
|
+
/* =============== INDENTATION SPACING ========= */
|
|
16
|
+
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
18
|
+
'ul, ol': {
|
|
19
|
+
boxSizing: 'border-box',
|
|
20
|
+
paddingLeft: `var(--ed--list--item-counter--padding, 24px)`
|
|
21
|
+
},
|
|
22
|
+
// Firefox does not handle empty block element inside li tag.
|
|
23
|
+
// If there is not block element inside li tag, then firefox sets inherited height to li
|
|
24
|
+
// However, if there is any block element and if it's empty (or has empty inline element) then
|
|
25
|
+
// firefox sets li tag height to zero.
|
|
26
|
+
//
|
|
27
|
+
// More details at
|
|
28
|
+
// https://product-fabric.atlassian.net/wiki/spaces/~455502413/pages/3149365890/ED-14110+Investigation
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
30
|
+
'&.ua-firefox': {
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
32
|
+
'ul, ol': {
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
34
|
+
'li p:empty, li p > span:empty': {
|
|
35
|
+
display: 'inline-block'
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
40
|
+
'.ak-ol, .ak-ul': {
|
|
41
|
+
// Ensures list item content adheres to the list's margin instead
|
|
42
|
+
// of filling the entire block row. This is important to allow
|
|
43
|
+
// clicking interactive elements which are floated next to a list.
|
|
44
|
+
//
|
|
45
|
+
// For some history and context on this block, see PRs related to tickets.:
|
|
46
|
+
// @see ED-6551 - original issue.
|
|
47
|
+
// @see ED-7015 - follow up issue.
|
|
48
|
+
// @see ED-7447 - flow-root change.
|
|
49
|
+
//
|
|
50
|
+
// @see https://css-tricks.com/display-flow-root/
|
|
51
|
+
//
|
|
52
|
+
// For older browsers the do not support flow-root. */
|
|
53
|
+
// stylelint-disable declaration-block-no-duplicate-properties */
|
|
54
|
+
display: 'flow-root'
|
|
55
|
+
/* stylelint-enable declaration-block-no-duplicate-properties */
|
|
56
|
+
},
|
|
57
|
+
/* =============== INDENTATION AESTHETICS ========= */
|
|
58
|
+
|
|
59
|
+
// We support nested lists up to six levels deep.
|
|
60
|
+
|
|
61
|
+
/* ======== LEGACY LISTS ======== */
|
|
62
|
+
|
|
63
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
64
|
+
'ul, ul ul ul ul': {
|
|
65
|
+
listStyleType: 'disc'
|
|
66
|
+
},
|
|
67
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
68
|
+
'ul ul, ul ul ul ul ul': {
|
|
69
|
+
listStyleType: 'circle'
|
|
70
|
+
},
|
|
71
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
72
|
+
'ul ul ul, ul ul ul ul ul ul': {
|
|
73
|
+
listStyleType: 'square'
|
|
74
|
+
},
|
|
75
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
76
|
+
'ol, ol ol ol ol': {
|
|
77
|
+
listStyleType: 'decimal'
|
|
78
|
+
},
|
|
79
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
80
|
+
'ol ol, ol ol ol ol ol': {
|
|
81
|
+
listStyleType: 'lower-alpha'
|
|
82
|
+
},
|
|
83
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
84
|
+
'ol ol ol, ol ol ol ol ol ol': {
|
|
85
|
+
listStyleType: 'lower-roman'
|
|
86
|
+
},
|
|
87
|
+
/* ======== PREDICTABLE LISTS ======== */
|
|
88
|
+
|
|
89
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
90
|
+
"ol[data-indent-level='1'], ol[data-indent-level='4']": {
|
|
91
|
+
listStyleType: 'decimal'
|
|
92
|
+
},
|
|
93
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
94
|
+
"ol[data-indent-level='2'], ol[data-indent-level='5']": {
|
|
95
|
+
listStyleType: 'lower-alpha'
|
|
96
|
+
},
|
|
97
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
98
|
+
"ol[data-indent-level='3'], ol[data-indent-level='6']": {
|
|
99
|
+
listStyleType: 'lower-roman'
|
|
100
|
+
},
|
|
101
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
102
|
+
"ul[data-indent-level='1'], ul[data-indent-level='4']": {
|
|
103
|
+
listStyleType: 'disc'
|
|
104
|
+
},
|
|
105
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
106
|
+
"ul[data-indent-level='2'], ul[data-indent-level='5']": {
|
|
107
|
+
listStyleType: 'circle'
|
|
108
|
+
},
|
|
109
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
110
|
+
"ul[data-indent-level='3'], ul[data-indent-level='6']": {
|
|
111
|
+
listStyleType: 'square'
|
|
112
|
+
},
|
|
113
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
114
|
+
li: {
|
|
115
|
+
position: 'relative',
|
|
116
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
117
|
+
'& > p:not(:first-child)': {
|
|
118
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
119
|
+
margin: `${"var(--ds-space-050, 4px)"} 0 0 0`
|
|
120
|
+
},
|
|
121
|
+
/* In SSR the above rule will apply to all p tags because first-child would be a style tag.
|
|
122
|
+
The following rule resets the first p tag back to its original margin
|
|
123
|
+
defined in packages/editor/editor-common/src/styles/shared/paragraph.ts */
|
|
124
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
125
|
+
'& > style:first-child + p': {
|
|
126
|
+
marginTop: blockNodesVerticalMargin
|
|
127
|
+
}
|
|
27
128
|
}
|
|
28
129
|
}
|
|
29
130
|
});
|
|
@@ -209,6 +209,57 @@ export const resizerStyles = css({
|
|
|
209
209
|
|
|
210
210
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
211
211
|
export const pragmaticResizerStyles = css({
|
|
212
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
213
|
+
'.fabric-editor-breakout-mark': {
|
|
214
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
215
|
+
'&:has([data-prosemirror-node-name="codeBlock"])': {
|
|
216
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
217
|
+
'> .pm-breakout-resize-handle-left': {
|
|
218
|
+
left: '-12px'
|
|
219
|
+
},
|
|
220
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
221
|
+
'> .pm-breakout-resize-handle-right': {
|
|
222
|
+
right: '-12px'
|
|
223
|
+
},
|
|
224
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
225
|
+
'> .pm-breakout-resize-handle': {
|
|
226
|
+
height: 'calc(100% - 12px)'
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
230
|
+
'&:has([data-prosemirror-node-name="expand"]), &:has([data-prosemirror-node-name="layoutSection"])': {
|
|
231
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
232
|
+
'> .pm-breakout-resize-handle-left': {
|
|
233
|
+
left: '-32px'
|
|
234
|
+
},
|
|
235
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
236
|
+
'> .pm-breakout-resize-handle-right': {
|
|
237
|
+
right: '-32px'
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
241
|
+
'&:has([data-prosemirror-node-name="expand"])': {
|
|
242
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
243
|
+
'> .pm-breakout-resize-handle': {
|
|
244
|
+
height: 'calc(100% - 4px)'
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
248
|
+
'&:has([data-prosemirror-node-name="layoutSection"])': {
|
|
249
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
250
|
+
'> .pm-breakout-resize-handle': {
|
|
251
|
+
height: 'calc(100% - 8px)'
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
// the first node in the document always has margin-top = 0
|
|
255
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
256
|
+
'&:has(.first-node-in-document)': {
|
|
257
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
258
|
+
'> .pm-breakout-resize-handle': {
|
|
259
|
+
height: '100%'
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
},
|
|
212
263
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
213
264
|
'.pm-breakout-resize-handle': {
|
|
214
265
|
position: 'relative',
|
|
@@ -217,7 +268,7 @@ export const pragmaticResizerStyles = css({
|
|
|
217
268
|
justifyContent: 'center',
|
|
218
269
|
height: '100%',
|
|
219
270
|
width: 7,
|
|
220
|
-
alignSelf: '
|
|
271
|
+
alignSelf: 'end',
|
|
221
272
|
gridRow: 1,
|
|
222
273
|
gridColumn: 1,
|
|
223
274
|
cursor: 'col-resize',
|
|
@@ -233,13 +284,11 @@ export const pragmaticResizerStyles = css({
|
|
|
233
284
|
},
|
|
234
285
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
235
286
|
'.pm-breakout-resize-handle-left': {
|
|
236
|
-
justifySelf: 'start'
|
|
237
|
-
left: -20
|
|
287
|
+
justifySelf: 'start'
|
|
238
288
|
},
|
|
239
289
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
240
290
|
'.pm-breakout-resize-handle-right': {
|
|
241
|
-
justifySelf: 'end'
|
|
242
|
-
right: -20
|
|
291
|
+
justifySelf: 'end'
|
|
243
292
|
},
|
|
244
293
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
245
294
|
'.pm-breakout-resize-handle-inner': {
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/* eslint-disable @atlaskit/ui-styling-standard/no-nested-selectors */
|
|
2
|
+
/* eslint-disable @atlaskit/ui-styling-standard/no-exported-styles */
|
|
3
|
+
/* eslint-disable @atlaskit/ui-styling-standard/use-compiled */
|
|
4
|
+
import { css, keyframes } from '@emotion/react';
|
|
5
|
+
const pulseIn = keyframes({
|
|
6
|
+
'0%, 100%': {
|
|
7
|
+
transform: 'scaleX(0)',
|
|
8
|
+
opacity: 0
|
|
9
|
+
},
|
|
10
|
+
'13%': {
|
|
11
|
+
transform: 'scaleX(1.4) scaleY(1.4)',
|
|
12
|
+
opacity: 1
|
|
13
|
+
},
|
|
14
|
+
'20%, 85%': {
|
|
15
|
+
transform: 'scaleX(1) scaleY(1)',
|
|
16
|
+
opacity: 1
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const pulseOut = keyframes({
|
|
20
|
+
'0%, 90%, 100%': {
|
|
21
|
+
transform: 'scaleX(1)',
|
|
22
|
+
opacity: 1
|
|
23
|
+
},
|
|
24
|
+
'10%, 80%': {
|
|
25
|
+
transform: 'scaleX(0)',
|
|
26
|
+
opacity: 0
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
export const telepointerColorAndCommonStyle = css({
|
|
30
|
+
'.ProseMirror .telepointer': {
|
|
31
|
+
position: 'relative',
|
|
32
|
+
transition: 'opacity 200ms',
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
34
|
+
'&.telepointer-selection:not(.inlineNodeView)': {
|
|
35
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
36
|
+
lineHeight: 1.2,
|
|
37
|
+
pointerEvents: 'none',
|
|
38
|
+
userSelect: 'none'
|
|
39
|
+
},
|
|
40
|
+
'&.telepointer-dim': {
|
|
41
|
+
opacity: 0.2
|
|
42
|
+
},
|
|
43
|
+
'&.color-0': {
|
|
44
|
+
'--telepointer-participant-text-color': "var(--ds-text-inverse, #FFFFFF)",
|
|
45
|
+
'--telepointer-participant-bg-color': "var(--ds-background-accent-red-bolder, #C9372C)"
|
|
46
|
+
},
|
|
47
|
+
'&.color-1': {
|
|
48
|
+
'--telepointer-participant-text-color': "var(--ds-text-inverse, #FFFFFF)",
|
|
49
|
+
'--telepointer-participant-bg-color': "var(--ds-background-accent-blue-bolder, #0C66E4)"
|
|
50
|
+
},
|
|
51
|
+
'&.color-2': {
|
|
52
|
+
'--telepointer-participant-text-color': "var(--ds-text-inverse, #FFFFFF)",
|
|
53
|
+
'--telepointer-participant-bg-color': "var(--ds-background-accent-green-bolder, #1F845A)"
|
|
54
|
+
},
|
|
55
|
+
'&.color-3': {
|
|
56
|
+
'--telepointer-participant-text-color': "var(--ds-text-inverse, #FFFFFF)",
|
|
57
|
+
'--telepointer-participant-bg-color': "var(--ds-background-accent-yellow-bolder, #946F00)"
|
|
58
|
+
},
|
|
59
|
+
'&.color-4': {
|
|
60
|
+
'--telepointer-participant-text-color': "var(--ds-text-inverse, #FFFFFF)",
|
|
61
|
+
'--telepointer-participant-bg-color': "var(--ds-background-accent-purple-bolder, #6E5DC6)"
|
|
62
|
+
},
|
|
63
|
+
'&.color-5': {
|
|
64
|
+
'--telepointer-participant-text-color': "var(--ds-text-inverse, #FFFFFF)",
|
|
65
|
+
'--telepointer-participant-bg-color': "var(--ds-background-accent-magenta-bolder, #AE4787)"
|
|
66
|
+
},
|
|
67
|
+
'&.color-6': {
|
|
68
|
+
'--telepointer-participant-text-color': "var(--ds-text-inverse, #FFFFFF)",
|
|
69
|
+
'--telepointer-participant-bg-color': "var(--ds-background-accent-teal-bolder, #227D9B)"
|
|
70
|
+
},
|
|
71
|
+
'&.color-7': {
|
|
72
|
+
'--telepointer-participant-text-color': "var(--ds-text-inverse, #FFFFFF)",
|
|
73
|
+
'--telepointer-participant-bg-color': "var(--ds-background-accent-orange-bolder, #C25100)"
|
|
74
|
+
},
|
|
75
|
+
'&.color-8': {
|
|
76
|
+
'--telepointer-participant-text-color': "var(--ds-text-inverse, #FFFFFF)",
|
|
77
|
+
'--telepointer-participant-bg-color': "var(--ds-background-accent-lime-bolder, #5B7F24)"
|
|
78
|
+
},
|
|
79
|
+
'&.color-9': {
|
|
80
|
+
'--telepointer-participant-text-color': "var(--ds-text-inverse, #FFFFFF)",
|
|
81
|
+
'--telepointer-participant-bg-color': "var(--ds-background-accent-gray-bolder, #626F86)"
|
|
82
|
+
},
|
|
83
|
+
'&.color-10': {
|
|
84
|
+
'--telepointer-participant-text-color': "var(--ds-text-accent-gray-bolder, #091E42)",
|
|
85
|
+
'--telepointer-participant-bg-color': "var(--ds-background-accent-blue-subtle, #579DFF)"
|
|
86
|
+
},
|
|
87
|
+
'&.color-11': {
|
|
88
|
+
'--telepointer-participant-text-color': "var(--ds-text-accent-gray-bolder, #091E42)",
|
|
89
|
+
'--telepointer-participant-bg-color': "var(--ds-background-accent-red-subtle, #F87168)"
|
|
90
|
+
},
|
|
91
|
+
'&.color-12': {
|
|
92
|
+
'--telepointer-participant-text-color': "var(--ds-text-accent-gray-bolder, #091E42)",
|
|
93
|
+
'--telepointer-participant-bg-color': "var(--ds-background-accent-orange-subtle, #FEA362)"
|
|
94
|
+
},
|
|
95
|
+
'&.color-13': {
|
|
96
|
+
'--telepointer-participant-text-color': "var(--ds-text-accent-gray-bolder, #091E42)",
|
|
97
|
+
'--telepointer-participant-bg-color': "var(--ds-background-accent-yellow-subtle, #F5CD47)"
|
|
98
|
+
},
|
|
99
|
+
'&.color-14': {
|
|
100
|
+
'--telepointer-participant-text-color': "var(--ds-text-accent-gray-bolder, #091E42)",
|
|
101
|
+
'--telepointer-participant-bg-color': "var(--ds-background-accent-green-subtle, #4BCE97)"
|
|
102
|
+
},
|
|
103
|
+
'&.color-15': {
|
|
104
|
+
'--telepointer-participant-text-color': "var(--ds-text-accent-gray-bolder, #091E42)",
|
|
105
|
+
'--telepointer-participant-bg-color': "var(--ds-background-accent-teal-subtle, #6CC3E0)"
|
|
106
|
+
},
|
|
107
|
+
'&.color-16': {
|
|
108
|
+
'--telepointer-participant-text-color': "var(--ds-text-accent-gray-bolder, #091E42)",
|
|
109
|
+
'--telepointer-participant-bg-color': "var(--ds-background-accent-purple-subtle, #9F8FEF)"
|
|
110
|
+
},
|
|
111
|
+
'&.color-17': {
|
|
112
|
+
'--telepointer-participant-text-color': "var(--ds-text-accent-gray-bolder, #091E42)",
|
|
113
|
+
'--telepointer-participant-bg-color': "var(--ds-background-accent-magenta-subtle, #E774BB)"
|
|
114
|
+
},
|
|
115
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
116
|
+
'html:not([data-color-mode=dark]) &': {
|
|
117
|
+
'--telepointer-participant-background-first-stop': '-850000%',
|
|
118
|
+
'--telepointer-participant-background-second-stop': '150000%'
|
|
119
|
+
},
|
|
120
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
121
|
+
'html[data-color-mode=dark] &': {
|
|
122
|
+
'--telepointer-participant-background-first-stop': '-800000%',
|
|
123
|
+
'--telepointer-participant-background-second-stop': '200000%'
|
|
124
|
+
},
|
|
125
|
+
'&[class*="color-"]': {
|
|
126
|
+
background: 'linear-gradient(to bottom, var(--telepointer-participant-bg-color) var(--telepointer-participant-background-first-stop), transparent var(--telepointer-participant-background-second-stop))',
|
|
127
|
+
'&::after': {
|
|
128
|
+
backgroundColor: 'var(--telepointer-participant-bg-color)',
|
|
129
|
+
color: 'var(--telepointer-participant-text-color)',
|
|
130
|
+
borderColor: 'var(--telepointer-participant-bg-color)'
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
export const telepointerStyle = css({
|
|
136
|
+
'.ProseMirror .telepointer': {
|
|
137
|
+
'&.telepointer-selection-badge': {
|
|
138
|
+
'.telepointer-initial, .telepointer-fullname': {
|
|
139
|
+
position: 'absolute',
|
|
140
|
+
display: 'block',
|
|
141
|
+
userSelect: 'none',
|
|
142
|
+
whiteSpace: 'pre',
|
|
143
|
+
top: -14,
|
|
144
|
+
left: 0,
|
|
145
|
+
font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
146
|
+
paddingLeft: "var(--ds-space-050, 4px)",
|
|
147
|
+
paddingRight: "var(--ds-space-050, 4px)",
|
|
148
|
+
color: "var(--ds-text-inverse, #FFFFFF)",
|
|
149
|
+
borderRadius: '0 2px 2px 0'
|
|
150
|
+
},
|
|
151
|
+
'.telepointer-initial': {
|
|
152
|
+
opacity: 1,
|
|
153
|
+
transition: 'opacity 0.15s ease-out'
|
|
154
|
+
},
|
|
155
|
+
'.telepointer-fullname': {
|
|
156
|
+
opacity: 0,
|
|
157
|
+
transform: 'scaleX(0)',
|
|
158
|
+
transformOrigin: 'top left',
|
|
159
|
+
transition: 'transform 0.15s ease-out, opacity 0.15s ease-out'
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
'&.telepointer-pulse-animate': {
|
|
163
|
+
'.telepointer-initial': {
|
|
164
|
+
animation: `${pulseOut} 2s ease-in-out`
|
|
165
|
+
},
|
|
166
|
+
'.telepointer-fullname': {
|
|
167
|
+
animation: `${pulseIn} 2s ease-in-out`
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
'&:hover': {
|
|
171
|
+
'.telepointer-initial': {
|
|
172
|
+
opacity: 0,
|
|
173
|
+
transitionDelay: '150ms'
|
|
174
|
+
},
|
|
175
|
+
'.telepointer-fullname': {
|
|
176
|
+
transform: 'scaleX(1)',
|
|
177
|
+
opacity: 1,
|
|
178
|
+
zIndex: 1
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
export const telepointerStyleWithInitialOnly = css({
|
|
184
|
+
'.ProseMirror .telepointer': {
|
|
185
|
+
'&.telepointer-selection-badge::after': {
|
|
186
|
+
content: 'attr(data-initial)',
|
|
187
|
+
position: 'absolute',
|
|
188
|
+
display: 'block',
|
|
189
|
+
top: -14,
|
|
190
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
191
|
+
fontSize: '0.5625rem',
|
|
192
|
+
padding: "var(--ds-space-025, 2px)",
|
|
193
|
+
color: "var(--ds-text-inverse, #FFFFFF)",
|
|
194
|
+
left: 0,
|
|
195
|
+
borderRadius: '2px 2px 2px 0',
|
|
196
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
197
|
+
lineHeight: 'initial'
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "207.
|
|
2
|
+
export const version = "207.12.0";
|
|
@@ -12,9 +12,8 @@ import React from 'react';
|
|
|
12
12
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
13
13
|
import { css, jsx, useTheme } from '@emotion/react';
|
|
14
14
|
import { browser } from '@atlaskit/editor-common/browser';
|
|
15
|
-
import { telepointerStyle, telepointerStyleWithInitialOnly } from '@atlaskit/editor-common/collab';
|
|
16
15
|
import { gapCursorStyles } from '@atlaskit/editor-common/selection';
|
|
17
|
-
import { GRID_GUTTER
|
|
16
|
+
import { GRID_GUTTER } from '@atlaskit/editor-common/styles';
|
|
18
17
|
import { blocktypeStyles } from '@atlaskit/editor-plugins/block-type/styles';
|
|
19
18
|
import { findReplaceStyles } from '@atlaskit/editor-plugins/find-replace/styles';
|
|
20
19
|
import { textHighlightStyle } from '@atlaskit/editor-plugins/paste-options-toolbar/styles';
|
|
@@ -54,6 +53,7 @@ import { ruleStyles } from './styles/rule';
|
|
|
54
53
|
import { shadowStyles } from './styles/shadowStyles';
|
|
55
54
|
import { linkingVisualRefreshV1Styles, smartCardStyles, smartLinksInLivePagesStyles, smartLinksInLivePagesStylesOld } from './styles/smartCardStyles';
|
|
56
55
|
import { tasksAndDecisionsStyles } from './styles/tasksAndDecisionsStyles';
|
|
56
|
+
import { telepointerColorAndCommonStyle, telepointerStyle, telepointerStyleWithInitialOnly } from './styles/telepointerStyles';
|
|
57
57
|
import { textColorStyles } from './styles/textColorStyles';
|
|
58
58
|
import { unsupportedStyles } from './styles/unsupportedStyles';
|
|
59
59
|
import { whitespaceStyles } from './styles/whitespaceStyles';
|
|
@@ -98,7 +98,7 @@ var akEditorBreakpointForSmallDevice = "1266px";
|
|
|
98
98
|
|
|
99
99
|
// jest warning: JSDOM version (22) doesn't support the new @container CSS rule
|
|
100
100
|
var contentStyles = function contentStyles() {
|
|
101
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t--ak-editor--default-gutter-padding: ", "px;\n\t/* 52 is from akEditorGutterPaddingDynamic via editor-shared-styles */\n\t--ak-editor--large-gutter-padding: ", "px;\n\t--ak-editor--default-layout-width: ", "px;\n\t--ak-editor--full-width-layout-width: ", "px;\n\t/* calculate editor line length, 100cqw is the editor container width */\n\t--ak-editor--line-length: min(\n\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\tvar(--ak-editor--default-layout-width)\n\t);\n\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t--ak-editor--breakout-full-page-guttering-padding: calc(\n\t\tvar(--ak-editor--large-gutter-padding) * 2 + var(--ak-editor--default-gutter-padding)\n\t);\n\n\t.fabric-editor--full-width-mode {\n\t\t--ak-editor--line-length: min(\n\t\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\t\tvar(--ak-editor--full-width-layout-width)\n\t\t);\n\t}\n\n\t.ProseMirror {\n\t\t--ak-editor-max-container-width: calc(100cqw - var(--ak-editor--large-gutter-padding));\n\t}\n\n\t/* We can't allow nodes that are inside other nodes to bleed from the parent container */\n\t.ProseMirror > div[data-prosemirror-node-block] [data-prosemirror-node-block] {\n\t\t--ak-editor-max-container-width: 100%;\n\t}\n\n\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t@container editor-area (width >= ", ") {\n\t\t.ProseMirror {\n\t\t\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t\t}\n\t}\n\n\t.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: var(--ak-editor-base-font-size);\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\
|
|
101
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t--ak-editor--default-gutter-padding: ", "px;\n\t/* 52 is from akEditorGutterPaddingDynamic via editor-shared-styles */\n\t--ak-editor--large-gutter-padding: ", "px;\n\t--ak-editor--default-layout-width: ", "px;\n\t--ak-editor--full-width-layout-width: ", "px;\n\t/* calculate editor line length, 100cqw is the editor container width */\n\t--ak-editor--line-length: min(\n\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\tvar(--ak-editor--default-layout-width)\n\t);\n\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t--ak-editor--breakout-full-page-guttering-padding: calc(\n\t\tvar(--ak-editor--large-gutter-padding) * 2 + var(--ak-editor--default-gutter-padding)\n\t);\n\n\t.fabric-editor--full-width-mode {\n\t\t--ak-editor--line-length: min(\n\t\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\t\tvar(--ak-editor--full-width-layout-width)\n\t\t);\n\t}\n\n\t.ProseMirror {\n\t\t--ak-editor-max-container-width: calc(100cqw - var(--ak-editor--large-gutter-padding));\n\t}\n\n\t/* We can't allow nodes that are inside other nodes to bleed from the parent container */\n\t.ProseMirror > div[data-prosemirror-node-block] [data-prosemirror-node-block] {\n\t\t--ak-editor-max-container-width: 100%;\n\t}\n\n\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t@container editor-area (width >= ", ") {\n\t\t.ProseMirror {\n\t\t\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t\t}\n\t}\n\n\t.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: var(--ak-editor-base-font-size);\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\t}\n\n\t", "\n\n\t.ProseMirror-hideselection *::selection {\n\t\tbackground: transparent;\n\t}\n\n\t.ProseMirror-hideselection *::-moz-selection {\n\t\tbackground: transparent;\n\t}\n\n\t/**\n\t * This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24\n\t *\n\t * 1. Merge and Release platform_editor_hide_cursor_when_pm_hideselection\n\t * 2. Cleanup duplicated style from platform_editor_advanced_code_blocks\n\t * https://product-fabric.atlassian.net/browse/ED-26331\n\t */\n\t", "\n\n\t/* This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24 */\n\t", "\n\n\t.ProseMirror-selectednode {\n\t\toutline: none;\n\t}\n\n\t.ProseMirror-selectednode:empty {\n\t\toutline: 2px solid ", ";\n\t}\n\n\t.ProseMirror.ProseMirror-focused:has(.ProseMirror-mark-boundary-cursor) {\n\t\tcaret-color: transparent;\n\t}\n\t.ProseMirror:not(.ProseMirror-focused) .ProseMirror-mark-boundary-cursor {\n\t\tdisplay: none;\n\t}\n\n\t", "\n\n\t", "\n\n\t", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n /* This needs to be after telepointer styles as some overlapping rules have equal specificity, and so the order is significant */\n ", "\n\n ", ";\n\n\t", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n // Switch between the two icons based on the visual refresh feature gate\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n\t.panelView-content-wrap {\n\t\tbox-sizing: border-box;\n\t}\n\n\t.mediaGroupView-content-wrap ul {\n\t\tpadding: 0;\n\t}\n\n\t/** Needed to override any cleared floats, e.g. image wrapping */\n\n\tdiv.fabric-editor-block-mark[class^='fabric-editor-align'] {\n\t\tclear: none !important;\n\t}\n\n\t.fabric-editor-align-end {\n\t\ttext-align: right;\n\t}\n\n\t.fabric-editor-align-start {\n\t\ttext-align: left;\n\t}\n\n\t.fabric-editor-align-center {\n\t\ttext-align: center;\n\t}\n\n\t// For FullPage only when inside a table\n\t// Related code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\t// In the \"editorContentAreaContainerStyle\" function\n\t.fabric-editor--full-width-mode {\n\t\t.pm-table-container {\n\t\t\t.code-block,\n\t\t\t.extension-container,\n\t\t\t.multiBodiedExtension--container {\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t}\n\t}\n\n\t.pm-table-header-content-wrap :not(.fabric-editor-alignment),\n\t.pm-table-header-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark,\n\t.pm-table-cell-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark {\n\t\tp:first-of-type {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.pm-table-cell-content-wrap .mediaGroupView-content-wrap {\n\t\tclear: both;\n\t}\n\n\t.hyperlink-floating-toolbar {\n\t\tpadding: 0;\n\t}\n\n\t/* Legacy Link icon in the Atlaskit package\n\t is bigger than the others, new ADS icon does not have this issue\n */\n\t", "\n"])), akEditorGutterPadding, akEditorGutterPaddingDynamic(), akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, akEditorCalculatedWideLayoutWidth, whitespaceStyles, indentationStyles, shadowStyles, InlineNodeViewSharedStyles, fg('editor_request_to_edit_task') ? null : css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\t\t\t\t.ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n\t\t\t\t\tpointer-events: none;\n\t\t\t\t\topacity: 0.7;\n\t\t\t\t}\n\t\t\t"]))), fg('platform_editor_hide_cursor_when_pm_hideselection') ? css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t\t\t\t.ProseMirror-hideselection {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t\t"]))) : null, editorExperiment('platform_editor_advanced_code_blocks', true) ? css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n\t\t\t\t.ProseMirror-hideselection {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t\t"]))) : null, "var(--ds-border-focused, #8cf)", placeholderTextStyles, placeholderStyles, editorExperiment('platform_editor_controls', 'variant1') ? placeholderOverflowStyles : null, editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_quick_insert_placeholder') ? placeholderWrapStyles : null, codeBlockStyles, blocktypeStyles(), codeMarkStyles, textColorStyles, backgroundColorStyles, listsStyles, ruleStyles, mediaStyles, fg('confluence_team_presence_scroll_to_pointer') ? telepointerStyle : telepointerStyleWithInitialOnly, telepointerColorAndCommonStyle, gapCursorStyles, panelStyles(), mentionsStyles, tasksAndDecisionsStyles, gridStyles, blockMarksStyles, dateStyles, extensionStyles, expandStyles(), findReplaceStyles, textHighlightStyle, taskDecisionStyles, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
102
102
|
exposure: false
|
|
103
103
|
}) && vanillaTaskItemStyles, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
104
104
|
exposure: false
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
// eslint-disable-
|
|
3
|
-
|
|
2
|
+
import { css } from '@emotion/react'; // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
3
|
+
|
|
4
4
|
// copied from packages/editor/editor-shared-styles/src/consts/consts.ts
|
|
5
5
|
var akEditorLineHeight = 1.714;
|
|
6
6
|
// copied from packages/editor/editor-common/src/styles/shared/smart-card.ts
|
|
@@ -11,20 +11,121 @@ var blockNodesVerticalMargin = '0.75rem';
|
|
|
11
11
|
|
|
12
12
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
13
13
|
export var listsStyles = css({
|
|
14
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
15
|
-
'.ProseMirror
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
//
|
|
26
|
-
|
|
27
|
-
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
15
|
+
'.ProseMirror': {
|
|
16
|
+
/* =============== INDENTATION SPACING ========= */
|
|
17
|
+
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
19
|
+
'ul, ol': {
|
|
20
|
+
boxSizing: 'border-box',
|
|
21
|
+
paddingLeft: "var(--ed--list--item-counter--padding, 24px)"
|
|
22
|
+
},
|
|
23
|
+
// Firefox does not handle empty block element inside li tag.
|
|
24
|
+
// If there is not block element inside li tag, then firefox sets inherited height to li
|
|
25
|
+
// However, if there is any block element and if it's empty (or has empty inline element) then
|
|
26
|
+
// firefox sets li tag height to zero.
|
|
27
|
+
//
|
|
28
|
+
// More details at
|
|
29
|
+
// https://product-fabric.atlassian.net/wiki/spaces/~455502413/pages/3149365890/ED-14110+Investigation
|
|
30
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
31
|
+
'&.ua-firefox': {
|
|
32
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
33
|
+
'ul, ol': {
|
|
34
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
35
|
+
'li p:empty, li p > span:empty': {
|
|
36
|
+
display: 'inline-block'
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
41
|
+
'.ak-ol, .ak-ul': {
|
|
42
|
+
// Ensures list item content adheres to the list's margin instead
|
|
43
|
+
// of filling the entire block row. This is important to allow
|
|
44
|
+
// clicking interactive elements which are floated next to a list.
|
|
45
|
+
//
|
|
46
|
+
// For some history and context on this block, see PRs related to tickets.:
|
|
47
|
+
// @see ED-6551 - original issue.
|
|
48
|
+
// @see ED-7015 - follow up issue.
|
|
49
|
+
// @see ED-7447 - flow-root change.
|
|
50
|
+
//
|
|
51
|
+
// @see https://css-tricks.com/display-flow-root/
|
|
52
|
+
//
|
|
53
|
+
// For older browsers the do not support flow-root. */
|
|
54
|
+
// stylelint-disable declaration-block-no-duplicate-properties */
|
|
55
|
+
display: 'flow-root'
|
|
56
|
+
/* stylelint-enable declaration-block-no-duplicate-properties */
|
|
57
|
+
},
|
|
58
|
+
/* =============== INDENTATION AESTHETICS ========= */
|
|
59
|
+
|
|
60
|
+
// We support nested lists up to six levels deep.
|
|
61
|
+
|
|
62
|
+
/* ======== LEGACY LISTS ======== */
|
|
63
|
+
|
|
64
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
65
|
+
'ul, ul ul ul ul': {
|
|
66
|
+
listStyleType: 'disc'
|
|
67
|
+
},
|
|
68
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
69
|
+
'ul ul, ul ul ul ul ul': {
|
|
70
|
+
listStyleType: 'circle'
|
|
71
|
+
},
|
|
72
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
73
|
+
'ul ul ul, ul ul ul ul ul ul': {
|
|
74
|
+
listStyleType: 'square'
|
|
75
|
+
},
|
|
76
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
77
|
+
'ol, ol ol ol ol': {
|
|
78
|
+
listStyleType: 'decimal'
|
|
79
|
+
},
|
|
80
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
81
|
+
'ol ol, ol ol ol ol ol': {
|
|
82
|
+
listStyleType: 'lower-alpha'
|
|
83
|
+
},
|
|
84
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
85
|
+
'ol ol ol, ol ol ol ol ol ol': {
|
|
86
|
+
listStyleType: 'lower-roman'
|
|
87
|
+
},
|
|
88
|
+
/* ======== PREDICTABLE LISTS ======== */
|
|
89
|
+
|
|
90
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
91
|
+
"ol[data-indent-level='1'], ol[data-indent-level='4']": {
|
|
92
|
+
listStyleType: 'decimal'
|
|
93
|
+
},
|
|
94
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
95
|
+
"ol[data-indent-level='2'], ol[data-indent-level='5']": {
|
|
96
|
+
listStyleType: 'lower-alpha'
|
|
97
|
+
},
|
|
98
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
99
|
+
"ol[data-indent-level='3'], ol[data-indent-level='6']": {
|
|
100
|
+
listStyleType: 'lower-roman'
|
|
101
|
+
},
|
|
102
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
103
|
+
"ul[data-indent-level='1'], ul[data-indent-level='4']": {
|
|
104
|
+
listStyleType: 'disc'
|
|
105
|
+
},
|
|
106
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
107
|
+
"ul[data-indent-level='2'], ul[data-indent-level='5']": {
|
|
108
|
+
listStyleType: 'circle'
|
|
109
|
+
},
|
|
110
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
111
|
+
"ul[data-indent-level='3'], ul[data-indent-level='6']": {
|
|
112
|
+
listStyleType: 'square'
|
|
113
|
+
},
|
|
114
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
115
|
+
li: {
|
|
116
|
+
position: 'relative',
|
|
117
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
118
|
+
'& > p:not(:first-child)': {
|
|
119
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
120
|
+
margin: "var(--ds-space-050, 4px)".concat(" 0 0 0")
|
|
121
|
+
},
|
|
122
|
+
/* In SSR the above rule will apply to all p tags because first-child would be a style tag.
|
|
123
|
+
The following rule resets the first p tag back to its original margin
|
|
124
|
+
defined in packages/editor/editor-common/src/styles/shared/paragraph.ts */
|
|
125
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
126
|
+
'& > style:first-child + p': {
|
|
127
|
+
marginTop: blockNodesVerticalMargin
|
|
128
|
+
}
|
|
28
129
|
}
|
|
29
130
|
}
|
|
30
131
|
});
|