-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathstyles.css
More file actions
793 lines (669 loc) · 15.3 KB
/
Copy pathstyles.css
File metadata and controls
793 lines (669 loc) · 15.3 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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
/* 公众号排版助手 - 专业预览视图样式 */
/* 全局样式 - 控制页面滚动 */
body.md2wechat-no-scroll {
overflow: hidden !important;
}
/* 主容器 - 占满整个视图区域 */
.md2wechat-view-wrapper {
display: flex;
flex-direction: column;
height: 100%;
width: 100%;
background: var(--background-primary);
}
/* 极简工具栏设计 */
.md2wechat-minimal-toolbar {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 20px;
background: var(--background-secondary);
border-bottom: 1px solid var(--background-modifier-border);
flex-shrink: 0;
min-height: 48px;
}
.md2wechat-toolbar-title {
font-weight: 600;
font-size: 15px;
color: var(--text-normal);
margin: 0;
}
/* 纯图标组 - 无容器,仿照官方左侧工具栏 */
.md2wechat-icon-group {
display: flex;
align-items: center;
gap: 12px;
}
/* 纯图标样式 - 完全无容器背景 */
.md2wechat-icon {
width: 18px;
height: 18px;
color: var(--icon-color);
cursor: pointer;
transition: color 0.1s ease-in-out;
flex-shrink: 0;
}
.md2wechat-icon:hover {
color: var(--icon-color-hover);
}
.md2wechat-icon:active {
color: var(--icon-color-active);
}
.md2wechat-icon-active {
color: var(--interactive-accent) !important;
}
/* 图标反馈状态 */
.md2wechat-icon-success {
color: #10ac84 !important;
transform: scale(1.1);
transition: all 0.2s ease;
}
.md2wechat-icon-error {
color: #ff3b30 !important;
transform: scale(1.1);
transition: all 0.2s ease;
}
.md2wechat-icon-info {
color: #f39c12 !important;
transform: scale(1.05);
transition: all 0.2s ease;
}
/* SVG 图标直接样式 - 官方风格 */
.md2wechat-icon svg {
width: 100%;
height: 100%;
display: block;
stroke: currentColor;
fill: currentColor;
stroke-width: 0;
}
.md2wechat-drawer-close-btn svg {
width: 14px;
height: 14px;
stroke: currentColor;
fill: none;
}
/* 遮罩层 */
.md2wechat-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.4);
opacity: 0;
visibility: hidden;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
z-index: 1000;
backdrop-filter: blur(2px);
}
.md2wechat-overlay-visible {
opacity: 1;
visibility: visible;
}
/* 抽屉面板 */
.md2wechat-drawer {
position: fixed;
top: 0;
right: 0;
width: 320px;
height: 100vh;
background: var(--background-primary);
border-left: 1px solid var(--background-modifier-border);
box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
transform: translateX(100%);
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
z-index: 1001;
display: flex;
flex-direction: column;
}
.md2wechat-drawer-open {
transform: translateX(0);
}
/* 抽屉头部 */
.md2wechat-drawer-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px 24px 16px 24px;
border-bottom: 1px solid var(--background-modifier-border);
flex-shrink: 0;
}
.md2wechat-drawer-title {
font-size: 18px;
font-weight: 600;
color: var(--text-normal);
margin: 0;
}
/* 抽屉关闭图标 - 纯图标样式 */
.md2wechat-drawer-close-icon {
width: 16px;
height: 16px;
color: var(--icon-color);
cursor: pointer;
transition: color 0.1s ease-in-out;
flex-shrink: 0;
}
.md2wechat-drawer-close-icon:hover {
color: var(--icon-color-hover);
}
.md2wechat-drawer-close-icon svg {
width: 100%;
height: 100%;
stroke: currentColor;
fill: none;
stroke-width: 2;
}
/* 抽屉内容 */
.md2wechat-drawer-content {
flex: 1;
padding: 24px;
overflow-y: auto;
}
/* 抽屉设置项 */
.md2wechat-drawer-section {
margin-bottom: 24px;
}
.md2wechat-drawer-label {
display: block;
font-size: 14px;
font-weight: 500;
color: var(--text-normal);
margin-bottom: 8px;
}
.md2wechat-drawer-select {
width: 100%;
background: var(--background-secondary);
border: 1px solid var(--background-modifier-border);
border-radius: 8px;
padding: 12px 16px;
font-size: 14px;
color: var(--text-normal);
cursor: pointer;
transition: all 0.2s ease;
font-family: var(--font-interface);
/* 🔧 强制确保select选项可见性 */
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236c757d' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
background-repeat: no-repeat;
background-position: right 12px center;
background-size: 16px 12px;
/* 确保在transform容器中正常渲染 */
transform: translateZ(0);
will-change: contents;
}
.md2wechat-drawer-select:hover {
border-color: var(--interactive-accent);
background: var(--background-modifier-hover);
}
.md2wechat-drawer-select:focus {
outline: none;
border-color: var(--interactive-accent);
box-shadow: 0 0 0 3px var(--interactive-accent-alpha);
}
/* 🔧 强制option元素正确显示 */
.md2wechat-drawer-select option {
background: var(--background-secondary);
color: var(--text-normal);
padding: 8px 12px;
border: none;
font-size: 14px;
font-family: var(--font-interface);
}
.md2wechat-drawer-select option:checked,
.md2wechat-drawer-select option[selected] {
background: var(--interactive-accent);
color: var(--text-on-accent);
font-weight: 500;
}
/* 🔧 自定义选择器样式 - 完全替代原生select */
.md2wechat-custom-select {
position: relative;
width: 100%;
}
.md2wechat-custom-select-button {
width: 100%;
background: var(--background-secondary);
border: 1px solid var(--background-modifier-border);
border-radius: 8px;
padding: 12px 16px;
font-size: 14px;
color: var(--text-normal);
cursor: pointer;
transition: all 0.2s ease;
font-family: var(--font-interface);
text-align: left;
display: flex;
justify-content: space-between;
align-items: center;
outline: none;
}
.md2wechat-custom-select-button:hover {
border-color: var(--interactive-accent);
background: var(--background-modifier-hover);
}
.md2wechat-custom-select-button:focus {
border-color: var(--interactive-accent);
box-shadow: 0 0 0 3px var(--interactive-accent-alpha);
}
.md2wechat-custom-select-arrow {
font-size: 12px;
color: var(--text-muted);
transition: transform 0.2s ease;
margin-left: 8px;
flex-shrink: 0;
}
.md2wechat-custom-select-options {
position: absolute;
top: 100%;
left: 0;
right: 0;
background: var(--background-primary);
border: 1px solid var(--background-modifier-border);
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
z-index: 1000;
max-height: 200px;
overflow-y: auto;
opacity: 0;
visibility: hidden;
transform: translateY(-8px);
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
margin-top: 4px;
}
.md2wechat-custom-select-options-open {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
.md2wechat-custom-select-option {
padding: 10px 16px;
cursor: pointer;
transition: background-color 0.1s ease;
border-bottom: 1px solid var(--background-modifier-border-hover);
font-size: 14px;
color: var(--text-normal);
}
.md2wechat-custom-select-option:last-child {
border-bottom: none;
}
.md2wechat-custom-select-option:hover {
background: var(--background-modifier-hover);
}
.md2wechat-custom-select-option-selected {
background: var(--interactive-accent);
color: var(--text-on-accent);
font-weight: 500;
}
.md2wechat-custom-select-option-selected:hover {
background: var(--interactive-accent-hover);
}
/* 预览容器 - 主内容区域 */
.md2wechat-preview-container {
flex: 1;
display: flex;
justify-content: center;
overflow: hidden;
background: var(--background-primary);
}
/* 内容区域 - 智能响应式设计 */
.md2wechat-content-area {
width: 100%;
height: 100%;
overflow-y: auto;
overflow-x: hidden;
background: #ffffff;
position: relative;
/* 默认样式 - 适合中等宽度侧边栏 (350px+) */
padding: 20px 16px;
margin: 12px;
border-radius: 6px;
box-shadow:
0 0 0 1px var(--background-modifier-border),
0 2px 8px rgba(0, 0, 0, 0.08);
}
/* 深色模式下的内容区域 */
.theme-dark .md2wechat-content-area {
background: var(--background-primary);
box-shadow:
0 0 0 1px var(--background-modifier-border),
0 2px 8px rgba(0, 0, 0, 0.2);
}
/* 占位符样式 - 空状态设计 */
.md2wechat-placeholder {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
height: 100%;
min-height: 300px;
color: var(--text-muted);
padding: 40px 20px;
}
.md2wechat-placeholder-icon {
font-size: 48px;
margin-bottom: 16px;
opacity: 0.6;
}
.md2wechat-placeholder h3 {
margin: 0 0 12px 0;
font-size: 18px;
font-weight: 600;
color: var(--text-normal);
}
.md2wechat-placeholder p {
margin: 0 0 24px 0;
font-size: 14px;
line-height: 1.5;
max-width: 280px;
}
.md2wechat-placeholder-steps {
display: flex;
flex-direction: column;
gap: 8px;
align-items: flex-start;
}
.md2wechat-placeholder-steps .step {
font-size: 13px;
padding: 8px 12px;
background: var(--background-modifier-hover);
border-radius: 16px;
border-left: 3px solid var(--interactive-accent);
font-weight: 500;
}
/* 滚动条优化 */
.md2wechat-content-area::-webkit-scrollbar {
width: 6px;
}
.md2wechat-content-area::-webkit-scrollbar-track {
background: transparent;
}
.md2wechat-content-area::-webkit-scrollbar-thumb {
background: var(--scrollbar-thumb-bg);
border-radius: 3px;
}
.md2wechat-content-area::-webkit-scrollbar-thumb:hover {
background: var(--scrollbar-thumb-bg-hover);
}
/* 公众号内容样式优化 */
.md2wechat-content-area h1,
.md2wechat-content-area h2,
.md2wechat-content-area h3,
.md2wechat-content-area h4,
.md2wechat-content-area h5,
.md2wechat-content-area h6 {
margin-top: 20px;
margin-bottom: 12px;
line-height: 1.3;
}
.md2wechat-content-area h1 {
margin-top: 0;
}
.md2wechat-content-area p {
margin-bottom: 12px;
line-height: 1.6;
}
.md2wechat-content-area img {
max-width: 100%;
height: auto;
border-radius: 3px;
margin: 12px 0;
}
.md2wechat-content-area blockquote {
margin: 12px 0;
padding: 12px;
border-left: 3px solid var(--interactive-accent);
background: var(--background-modifier-hover);
border-radius: 0 3px 3px 0;
}
.md2wechat-content-area code {
background: var(--code-background);
padding: 2px 4px;
border-radius: 2px;
font-family: var(--font-monospace);
font-size: 0.88em;
}
.md2wechat-content-area pre {
background: var(--code-background);
padding: 12px;
border-radius: 4px;
overflow-x: auto;
margin: 12px 0;
font-size: 0.9em;
}
.md2wechat-content-area ul,
.md2wechat-content-area ol {
padding-left: 20px;
margin-bottom: 12px;
}
.md2wechat-content-area li {
margin-bottom: 6px;
line-height: 1.5;
}
/* 响应式设计 - 针对 Obsidian 侧边栏优化 */
/* 极窄侧边栏 (< 280px) - 最紧凑布局 */
.md2wechat-view-wrapper {
container-type: inline-size;
}
@container (max-width: 279px) {
.md2wechat-content-area {
margin: 4px;
padding: 12px 8px;
border-radius: 3px;
}
.md2wechat-minimal-toolbar {
padding: 8px 12px;
min-height: 44px;
}
.md2wechat-toolbar-title {
font-size: 13px;
}
.md2wechat-icon-group {
gap: 10px;
}
.md2wechat-icon {
width: 16px;
height: 16px;
}
/* 抽屉在极窄屏幕下占满宽度 */
.md2wechat-drawer {
width: 100vw;
left: 0;
}
.md2wechat-drawer-header {
padding: 16px 16px 12px 16px;
}
.md2wechat-drawer-title {
font-size: 16px;
}
.md2wechat-drawer-content {
padding: 16px;
}
.md2wechat-drawer-section {
margin-bottom: 20px;
}
.md2wechat-drawer-select {
padding: 10px 12px;
font-size: 13px;
}
.md2wechat-placeholder {
padding: 16px 8px;
min-height: 200px;
}
.md2wechat-placeholder h3 {
font-size: 16px;
}
.md2wechat-placeholder p {
font-size: 12px;
}
/* 更紧凑的内容间距 */
.md2wechat-content-area h1,
.md2wechat-content-area h2,
.md2wechat-content-area h3,
.md2wechat-content-area h4,
.md2wechat-content-area h5,
.md2wechat-content-area h6 {
margin-top: 16px;
margin-bottom: 8px;
}
.md2wechat-content-area p {
margin-bottom: 8px;
line-height: 1.5;
}
.md2wechat-content-area blockquote,
.md2wechat-content-area pre {
margin: 8px 0;
padding: 8px;
}
.md2wechat-content-area ul,
.md2wechat-content-area ol {
padding-left: 16px;
margin-bottom: 8px;
}
}
/* 窄侧边栏 (280px - 349px) - 紧凑布局 */
@container (min-width: 280px) and (max-width: 349px) {
.md2wechat-content-area {
margin: 6px;
padding: 16px 10px;
}
.md2wechat-minimal-toolbar {
padding: 10px 14px;
}
.md2wechat-toolbar-title {
font-size: 14px;
}
.md2wechat-icon-group {
gap: 11px;
}
.md2wechat-icon {
width: 17px;
height: 17px;
}
.md2wechat-drawer {
width: 280px;
}
.md2wechat-drawer-header {
padding: 18px 20px 14px 20px;
}
.md2wechat-drawer-title {
font-size: 17px;
}
.md2wechat-drawer-content {
padding: 20px;
}
.md2wechat-drawer-section {
margin-bottom: 22px;
}
.md2wechat-placeholder {
padding: 20px 10px;
min-height: 240px;
}
}
/* 中等侧边栏 (350px - 499px) - 标准布局 */
@container (min-width: 350px) and (max-width: 499px) {
.md2wechat-minimal-toolbar {
padding: 11px 16px;
}
.md2wechat-drawer {
width: 300px;
}
.md2wechat-drawer-content {
padding: 22px;
}
}
/* 宽侧边栏 (> 500px) - 更舒适的布局 */
@container (min-width: 500px) {
.md2wechat-content-area {
margin: 16px;
padding: 24px 20px;
max-width: 420px; /* 恢复最佳阅读宽度限制 */
}
.md2wechat-minimal-toolbar {
padding: 14px 20px;
min-height: 52px;
}
.md2wechat-toolbar-title {
font-size: 16px;
}
.md2wechat-icon-group {
gap: 14px;
}
.md2wechat-icon {
width: 20px;
height: 20px;
}
.md2wechat-drawer {
width: 360px;
}
.md2wechat-drawer-header {
padding: 24px 28px 20px 28px;
}
.md2wechat-drawer-title {
font-size: 20px;
}
.md2wechat-drawer-content {
padding: 28px;
}
.md2wechat-drawer-section {
margin-bottom: 28px;
}
.md2wechat-drawer-label {
font-size: 15px;
margin-bottom: 10px;
}
.md2wechat-drawer-select {
padding: 14px 18px;
font-size: 15px;
border-radius: 10px;
}
.md2wechat-placeholder {
padding: 32px 20px;
}
/* 更宽松的内容间距 */
.md2wechat-content-area h1,
.md2wechat-content-area h2,
.md2wechat-content-area h3,
.md2wechat-content-area h4,
.md2wechat-content-area h5,
.md2wechat-content-area h6 {
margin-top: 24px;
margin-bottom: 16px;
}
.md2wechat-content-area p {
margin-bottom: 16px;
line-height: 1.7;
}
}
/* 回退方案 - 如果不支持 container queries */
@supports not (container-type: inline-size) {
@media (max-width: 350px) {
.md2wechat-content-area {
margin: 4px;
padding: 12px 8px;
}
.md2wechat-toolbar {
padding: 8px 8px;
}
}
}
/* 动画效果 */
.md2wechat-content-area {
transition: all 0.3s ease;
}
.md2wechat-view-wrapper {
animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}