-
Notifications
You must be signed in to change notification settings - Fork 300
Expand file tree
/
Copy pathstyle.css
More file actions
190 lines (162 loc) · 3.84 KB
/
style.css
File metadata and controls
190 lines (162 loc) · 3.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
@import './extensions/color/color-styles.css';
@import './extensions/highlight/highlight-styles.css';
.ProseMirror {
outline: none;
caret-color: var(--ink-gray-9);
word-break: break-word;
}
/* Firefox */
.ProseMirror-focused:focus-visible {
outline: none;
}
/* Placeholder */
.ProseMirror:not(.ProseMirror-focused) p.is-editor-empty::before {
content: attr(data-placeholder);
float: left;
color: var(--ink-gray-4);
pointer-events: none;
height: 0;
}
.ProseMirror-selectednode video,
img.ProseMirror-selectednode {
outline: 2px solid var(--outline-gray-2);
}
.table-of-contents-node {
padding: 0 10px;
}
.table-of-contents-node li p {
width: fit-content;
padding: 0 3px;
border-radius: 4px;
}
.table-of-contents-node li p:hover {
background-color: var(--surface-gray-2);
}
.table-of-contents-node.ProseMirror-selectednode {
outline: 2px solid var(--outline-gray-2);
outline-offset: 2px;
border-radius: 4px;
}
.ProseMirror ul[data-type='taskList'] {
list-style: none;
padding: 0;
li {
align-items: flex-start;
display: flex;
margin: 0;
> label {
flex: 0 0 auto;
margin-right: 0.5rem;
margin-top: 0.25rem;
height: 1lh;
display: flex;
align-items: center;
user-select: none;
}
> div {
flex: 1 1 auto;
margin-bottom: 0;
> p {
margin: 0.25rem 0;
}
}
}
ul[data-type='taskList'] {
margin: 0;
}
input[type='checkbox'] {
cursor: pointer;
width: 14px;
height: 14px;
border-radius: 4px;
color: theme('colors.gray.900');
}
}
.resize-cursor {
cursor: ew-resize;
cursor: col-resize;
}
.tag-item,
.tag-suggestion-active {
background-color: var(--surface-gray-1, #f8f8f8);
color: inherit;
border: 1px solid transparent;
padding: 0px 2px;
border-radius: 4px;
font-size: 1em;
white-space: nowrap;
cursor: default;
}
.tag-item.ProseMirror-selectednode {
border-color: var(--outline-gray-3, #c7c7c7);
}
.tag-suggestion-active {
background-color: var(--surface-gray-2, #f3f3f3);
}
.ProseMirror table {
table-layout: fixed;
}
.ProseMirror td,
.ProseMirror th {
padding: 0.5rem;
border: 1px solid var(--outline-gray-2);
position: relative;
}
.ProseMirror td p,
.ProseMirror th p {
margin: 0;
}
.ProseMirror th {
background-color: var(--surface-gray-2);
}
/* Applies the current color to the link's underline */
.ProseMirror a span[style] {
text-decoration: underline;
}
.ProseMirror .tableWrapper {
overflow-x: scroll;
}
/* Edit prose classes to be more functional */
.prose-v2 {
line-height: 1.5 !important;
blockquote {
quotes: none;
font-style: normal;
margin-top: 0.75em;
margin-bottom: 0.75em;
}
p,
ul,
ol,
pre,
blockquote,
table {
margin-top: 0;
margin-bottom: 0;
}
/* fix: heading bottom margin */
:is(h1, h2, h3, h4, h5, h6) + :is(h1, h2, h3, h4, h5, h6) {
margin-top: 0;
}
:is(h1, h2, h3, h4, h5, h6):first-child {
margin-top: 0;
}
hr {
margin: 2.25em 0;
}
}
/* Empty paragraph height in prose-v3.
ProseMirror always renders empty paragraphs as <p><br class="ProseMirror-trailingBreak"></p>
even in readonly mode, so p:empty never matches.
Edit mode: no override — natural 14px × 1.7 = 23.8px, avoids jump when typing
Readonly mode: scoped via [contenteditable=false] + ProseMirror-trailingBreak class
to precisely target empty paragraphs (not inline <br> in content) */
.ProseMirror[contenteditable='false'] .prose-v3 p:has(> br.ProseMirror-trailingBreak:only-child),
.prose-v3.ProseMirror[contenteditable='false'] p:has(> br.ProseMirror-trailingBreak:only-child) {
line-height: 20px;
}
/* prose-v3 blockquote: 2px left border — overrides Tailwind Typography's 0.25rem
using element specificity (0,1,1) to beat the plugin's :where() (0,1,0) */
.prose-v3 blockquote {
border-inline-start-width: 2px;
}