|
4 | 4 |
|
5 | 5 | /* 编辑器容器 */ |
6 | 6 | .milkup-editor { |
7 | | - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; |
| 7 | + font-family: |
| 8 | + -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; |
8 | 9 | font-size: 16px; |
9 | 10 | line-height: 1.6; |
10 | 11 | color: var(--text-color, #333); |
|
39 | 40 | .milkup-syntax-visible, |
40 | 41 | .milkup-syntax { |
41 | 42 | color: var(--text-color-3, #999); |
42 | | - font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; |
| 43 | + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; |
43 | 44 | font-size: 0.9em; |
44 | 45 | } |
45 | 46 |
|
46 | 47 | /* 语法标记 - 默认样式 */ |
47 | 48 | .milkup-syntax-marker { |
48 | 49 | color: var(--text-color-3, #999); |
49 | | - font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; |
| 50 | + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; |
50 | 51 | font-size: 0.9em; |
51 | 52 | } |
52 | 53 |
|
|
71 | 72 | var(--hover-background-color, rgba(94, 129, 172, 0.1)) 100% |
72 | 73 | ); |
73 | 74 | color: var(--text-color-1, #333); |
74 | | - font-family: var(--milkup-font-code), 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, |
75 | | - monospace; |
| 75 | + font-family: |
| 76 | + var(--milkup-font-code), "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; |
76 | 77 | font-size: calc(var(--milkup-font-size-code, 16px) * 0.875); |
77 | 78 | font-weight: 600; |
78 | 79 | line-height: 1.2; |
|
163 | 164 | line-height: 1.25; |
164 | 165 | } |
165 | 166 |
|
166 | | -.milkup-editor h1 { font-size: 2em; } |
167 | | -.milkup-editor h2 { font-size: 1.5em; } |
168 | | -.milkup-editor h3 { font-size: 1.25em; } |
169 | | -.milkup-editor h4 { font-size: 1em; } |
170 | | -.milkup-editor h5 { font-size: 0.875em; } |
171 | | -.milkup-editor h6 { font-size: 0.85em; color: var(--text-color-2, #6a737d); } |
| 167 | +.milkup-editor h1 { |
| 168 | + font-size: 2em; |
| 169 | +} |
| 170 | +.milkup-editor h2 { |
| 171 | + font-size: 1.5em; |
| 172 | +} |
| 173 | +.milkup-editor h3 { |
| 174 | + font-size: 1.25em; |
| 175 | +} |
| 176 | +.milkup-editor h4 { |
| 177 | + font-size: 1em; |
| 178 | +} |
| 179 | +.milkup-editor h5 { |
| 180 | + font-size: 0.875em; |
| 181 | +} |
| 182 | +.milkup-editor h6 { |
| 183 | + font-size: 0.85em; |
| 184 | + color: var(--text-color-2, #6a737d); |
| 185 | +} |
172 | 186 |
|
173 | 187 | /* 段落 */ |
174 | 188 | .milkup-editor p { |
|
224 | 238 | color: var(--text-color-3, #999); |
225 | 239 | cursor: pointer; |
226 | 240 | opacity: 0; |
227 | | - transition: opacity 0.2s, background 0.2s, color 0.2s; |
| 241 | + transition: |
| 242 | + opacity 0.2s, |
| 243 | + background 0.2s, |
| 244 | + color 0.2s; |
228 | 245 | } |
229 | 246 |
|
230 | 247 | .milkup-code-block:hover .milkup-code-block-copy-btn { |
|
263 | 280 | } |
264 | 281 |
|
265 | 282 | .milkup-custom-select-button::after { |
266 | | - content: ''; |
| 283 | + content: ""; |
267 | 284 | width: 0; |
268 | 285 | height: 0; |
269 | 286 | border-left: 4px solid transparent; |
|
364 | 381 | } |
365 | 382 |
|
366 | 383 | .milkup-code-block-editor .cm-content { |
367 | | - font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; |
368 | | - font-size: 14px; |
| 384 | + font-family: var( |
| 385 | + --milkup-font-code, |
| 386 | + "SFMono-Regular", |
| 387 | + Consolas, |
| 388 | + "Liberation Mono", |
| 389 | + Menlo, |
| 390 | + monospace |
| 391 | + ) !important; |
| 392 | + font-size: var(--milkup-font-size-code, 14px) !important; |
369 | 393 | color: var(--text-color, #333); |
370 | 394 | } |
371 | 395 |
|
|
435 | 459 | } |
436 | 460 |
|
437 | 461 | .milkup-context-menu-item.has-submenu::after { |
438 | | - content: ''; |
| 462 | + content: ""; |
439 | 463 | width: 0; |
440 | 464 | height: 0; |
441 | 465 | border-top: 4px solid transparent; |
|
490 | 514 | border-radius: 2px; |
491 | 515 | background: var(--background-color-1, #fff); |
492 | 516 | cursor: pointer; |
493 | | - transition: background 0.05s ease, border-color 0.05s ease; |
| 517 | + transition: |
| 518 | + background 0.05s ease, |
| 519 | + border-color 0.05s ease; |
494 | 520 | } |
495 | 521 |
|
496 | 522 | .milkup-table-grid-picker .grid-cell.active { |
|
724 | 750 |
|
725 | 751 | .milkup-editor .milkup-image-placeholder-src { |
726 | 752 | font-size: 0.8em; |
727 | | - font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; |
| 753 | + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; |
728 | 754 | word-break: break-all; |
729 | 755 | max-width: 100%; |
730 | 756 | opacity: 0.7; |
|
754 | 780 | color: inherit; |
755 | 781 | } |
756 | 782 |
|
757 | | - |
758 | 783 | /* 数学块预览区域 */ |
759 | 784 | .milkup-editor .math-block .math-preview { |
760 | 785 | padding: 0.5em 0; |
|
794 | 819 | display: inline-block; |
795 | 820 | min-width: 1ch; |
796 | 821 | min-height: 1.2em; |
797 | | - font-family: KaTeX_Main, 'Times New Roman', serif; |
| 822 | + font-family: KaTeX_Main, "Times New Roman", serif; |
798 | 823 | font-size: 1.21em; |
799 | 824 | white-space: pre-wrap; |
800 | 825 | text-align: center; |
|
1001 | 1026 | display: inline; |
1002 | 1027 | user-select: auto; |
1003 | 1028 | color: var(--text-color-3, #999); |
1004 | | - font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; |
| 1029 | + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; |
1005 | 1030 | } |
1006 | 1031 |
|
1007 | 1032 | /* 源码模式下隐藏数学公式渲染 widget */ |
|
1049 | 1074 | padding-right: 8px; |
1050 | 1075 | text-align: right; |
1051 | 1076 | color: var(--text-color-3, #999) !important; |
1052 | | - font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace !important; |
| 1077 | + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace !important; |
1053 | 1078 | font-size: 14px !important; |
1054 | 1079 | font-weight: normal !important; |
1055 | 1080 | font-style: normal !important; |
|
1061 | 1086 | } |
1062 | 1087 |
|
1063 | 1088 | /* 列表项内段落的行号 - 补偿列表标记宽度 */ |
1064 | | -.milkup-editor.source-view .milkup-list-item.source-view .milkup-list-item-content > .milkup-list-line-number::before, |
1065 | | -.milkup-editor.source-view .milkup-task-item.source-view .milkup-list-item-content > .milkup-list-line-number::before { |
| 1089 | +.milkup-editor.source-view |
| 1090 | + .milkup-list-item.source-view |
| 1091 | + .milkup-list-item-content |
| 1092 | + > .milkup-list-line-number::before, |
| 1093 | +.milkup-editor.source-view |
| 1094 | + .milkup-task-item.source-view |
| 1095 | + .milkup-list-item-content |
| 1096 | + > .milkup-list-line-number::before { |
1066 | 1097 | left: calc(-60px - var(--marker-width, 20px)); |
1067 | 1098 | } |
1068 | 1099 |
|
|
1071 | 1102 | margin: 0; |
1072 | 1103 | padding: 0; |
1073 | 1104 | line-height: 1.6; |
1074 | | - font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; |
| 1105 | + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; |
1075 | 1106 | font-size: 14px; |
1076 | 1107 | color: var(--secondary-color, #6a9955); |
1077 | 1108 | white-space: pre-wrap; |
|
1092 | 1123 |
|
1093 | 1124 | .milkup-editor.source-view .milkup-code-block-lines::before { |
1094 | 1125 | counter-increment: line-number attr(data-line-count number, 1); |
1095 | | - content: ''; |
| 1126 | + content: ""; |
1096 | 1127 | display: none; |
1097 | 1128 | } |
1098 | 1129 |
|
|
1122 | 1153 | /* 源码模式下的占位符需要向右偏移以避开行号 */ |
1123 | 1154 | .milkup-editor.milkup-empty.source-view::before { |
1124 | 1155 | padding-top: 56px; |
1125 | | - padding-left: calc(var(--milkup-editor-padding, 20px) + 20px + 48px); /* 左右边距 + 上下边距 + 行号区域 */ |
| 1156 | + padding-left: calc( |
| 1157 | + var(--milkup-editor-padding, 20px) + 20px + 48px |
| 1158 | + ); /* 左右边距 + 上下边距 + 行号区域 */ |
1126 | 1159 | } |
1127 | 1160 |
|
1128 | 1161 | /* ============ 源码模式样式 ============ */ |
|
1157 | 1190 |
|
1158 | 1191 | /* 代码块源码内容 */ |
1159 | 1192 | .milkup-code-block-source { |
1160 | | - font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; |
| 1193 | + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; |
1161 | 1194 | font-size: 14px; |
1162 | 1195 | line-height: 1.6; |
1163 | 1196 | color: inherit; |
|
1173 | 1206 | } |
1174 | 1207 |
|
1175 | 1208 | .milkup-code-block-source:empty::before { |
1176 | | - content: '```\n\n```'; |
| 1209 | + content: "```\n\n```"; |
1177 | 1210 | color: var(--text-color-3, #999); |
1178 | 1211 | pointer-events: none; |
1179 | 1212 | } |
1180 | 1213 |
|
1181 | 1214 | /* 代码块源码模式:使用 data-line-count 属性递增行号计数器 */ |
1182 | 1215 | .milkup-editor.source-view .milkup-code-block-source::before { |
1183 | 1216 | counter-increment: line-number attr(data-line-count number, 1); |
1184 | | - content: ''; |
| 1217 | + content: ""; |
1185 | 1218 | display: none; |
1186 | 1219 | } |
1187 | 1220 |
|
|
1251 | 1284 | /* 列表标记 */ |
1252 | 1285 | .milkup-list-marker { |
1253 | 1286 | display: none; |
1254 | | - font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; |
| 1287 | + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; |
1255 | 1288 | color: var(--text-color-3, #999); |
1256 | 1289 | } |
1257 | 1290 |
|
|
1298 | 1331 | border-radius: 3px; |
1299 | 1332 | background: var(--background-color, #fff); |
1300 | 1333 | cursor: pointer; |
1301 | | - transition: background-color 0.15s ease, border-color 0.15s ease; |
| 1334 | + transition: |
| 1335 | + background-color 0.15s ease, |
| 1336 | + border-color 0.15s ease; |
1302 | 1337 | box-sizing: border-box; |
1303 | 1338 | } |
1304 | 1339 |
|
|
1378 | 1413 | padding: 6px 8px; |
1379 | 1414 | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); |
1380 | 1415 | font-size: 13px; |
1381 | | - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; |
| 1416 | + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; |
1382 | 1417 | } |
1383 | 1418 |
|
1384 | 1419 | .milkup-search-row, |
|
1500 | 1535 | white-space: nowrap; |
1501 | 1536 | overflow: hidden; |
1502 | 1537 | text-overflow: ellipsis; |
1503 | | - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; |
| 1538 | + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; |
1504 | 1539 | } |
0 commit comments