-
Notifications
You must be signed in to change notification settings - Fork 0
Exp 10000 and file tree
/
Copy patheditor.css
More file actions
149 lines (127 loc) · 3.18 KB
/
editor.css
File metadata and controls
149 lines (127 loc) · 3.18 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
/* Editor & Preview panes, textarea, markdown-body overrides */
.editor-pane,
.preview-pane {
flex: 1;
min-width: 0;
/* allow flex children to shrink below content width */
padding: 20px;
overflow-y: auto;
position: relative;
transition: background-color 0.3s ease;
}
.editor-pane {
background-color: var(--editor-bg);
border-right: none;
padding-right: 0px;
box-shadow: 1px 0 0 var(--border-color);
}
.preview-pane {
background-color: var(--preview-bg);
/* Using the new variable for preview background */
overflow-x: hidden;
}
/* Custom scrollbar — rounded and subtle */
.editor-pane::-webkit-scrollbar,
.preview-pane::-webkit-scrollbar,
#markdown-editor::-webkit-scrollbar {
width: 7px;
height: 7px;
}
.editor-pane::-webkit-scrollbar-track,
.preview-pane::-webkit-scrollbar-track,
#markdown-editor::-webkit-scrollbar-track {
background: transparent;
}
.editor-pane::-webkit-scrollbar-thumb,
.preview-pane::-webkit-scrollbar-thumb,
#markdown-editor::-webkit-scrollbar-thumb {
background: var(--scrollbar-thumb);
border-radius: 10px;
}
.editor-pane::-webkit-scrollbar-thumb:hover,
.preview-pane::-webkit-scrollbar-thumb:hover,
#markdown-editor::-webkit-scrollbar-thumb:hover {
background: var(--button-active);
}
#markdown-editor {
width: 100%;
height: 100%;
border: none;
background-color: var(--editor-bg);
color: var(--text-color);
resize: none;
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
font-size: 14px;
line-height: 1.6;
padding: 12px;
transition: background-color 0.3s ease, color 0.3s ease;
overflow-y: auto;
}
#markdown-editor:focus {
outline: none;
}
.preview-pane {
padding: 20px;
}
.markdown-body {
padding: 20px;
overflow: hidden;
box-sizing: border-box;
background-color: var(--preview-bg);
/* Ensuring the markdown content matches preview background */
color: var(--preview-text-color);
/* Using specific text color for preview content */
}
/* Style tables in light mode */
.markdown-body table {
background-color: var(--table-bg);
border-color: var(--border-color);
}
.markdown-body table tr {
background-color: var(--table-bg);
border-top: 1px solid var(--border-color);
}
.markdown-body table tr:nth-child(2n) {
background-color: var(--bg-color);
}
/* Style code blocks in light mode */
.markdown-body pre {
background-color: var(--code-bg);
border-radius: 6px;
max-height: 400px;
overflow-y: auto;
position: relative;
}
.markdown-body code {
background-color: var(--code-bg);
border-radius: 3px;
padding: 0.2em 0.4em;
}
/* Copy button on non-executable code blocks */
.pre-copy-btn {
position: sticky;
top: 4px;
float: right;
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.15);
border-radius: 6px;
padding: 2px 8px;
font-size: 0.8em;
cursor: pointer;
opacity: 0;
transition: opacity 0.15s;
z-index: 2;
}
.markdown-body pre:hover .pre-copy-btn {
opacity: 1;
}
.pre-copy-btn:hover {
background: rgba(255, 255, 255, 0.2);
}
[data-theme="light"] .pre-copy-btn {
background: rgba(0, 0, 0, 0.06);
border-color: rgba(0, 0, 0, 0.12);
}
[data-theme="light"] .pre-copy-btn:hover {
background: rgba(0, 0, 0, 0.12);
}