-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.css
More file actions
245 lines (234 loc) · 7.76 KB
/
Copy pathstyles.css
File metadata and controls
245 lines (234 loc) · 7.76 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
/* @settings
name: Code Linker
id: code-linker
settings:
-
id: code-linker-highlight-color
title: Preview line highlight
description: Background of the target line in hover previews and embeds. Default follows the theme's selection colour.
type: variable-themed-color
format: hex
opacity: true
default-light: '#c8dcff80'
default-dark: '#3a4a6b80'
-
id: code-linker-stale-color
title: Stale-link underline colour
description: Links whose stored line has drifted from the declaration. Default follows the theme's warning colour.
type: variable-themed-color
format: hex
opacity: false
default-light: '#c1810b'
default-dark: '#e0a526'
-
id: code-linker-broken-color
title: Broken-link underline colour
description: Links whose symbol was renamed or removed. Default follows the theme's error colour.
type: variable-themed-color
format: hex
opacity: false
default-light: '#c4302b'
default-dark: '#e35555'
-
id: code-linker-mark-underline-style
title: Stale / broken underline style
type: variable-select
default: dotted
options:
- dotted
- dashed
- solid
- double
*/
.code-linker-suggestion {
display: flex;
gap: 0.5em;
align-items: baseline;
}
.code-linker-name {
font-weight: var(--font-semibold);
}
.code-linker-kind {
color: var(--text-muted);
font-size: var(--font-ui-smaller);
}
.code-linker-path {
margin-left: auto;
color: var(--text-faint);
font-size: var(--font-ui-smaller);
}
.code-linker-input {
width: 100%;
}
/* Inline status under the scan-folders field, shown only when a configured
folder is missing — a light error line instead of a full warning row. */
.code-linker-section-desc {
color: var(--text-error);
font-size: var(--font-ui-small);
margin: -6px 0 14px;
}
/* User editor preset rows: name + template + remove on one line, wrapping to
two lines on a narrow pane so nothing collides. The full control area is used
(the empty name label is hidden) and the theme styles the row like any other. */
.code-linker-editor-row .setting-item-info {
display: none;
}
.code-linker-editor-row .setting-item-control {
width: 100%;
flex-wrap: wrap;
justify-content: flex-start;
gap: 8px;
}
.code-linker-editor-name {
flex: 1 1 140px;
min-width: 0;
}
.code-linker-editor-tpl {
flex: 3 1 240px;
min-width: 0;
}
/* Snippet chrome shared by the hover popover and the inline embed. Both containers carry
.code-linker-code (see the token colours below). The popover is a fixed overlay; the
embed flows inline — otherwise the parts match. --cl-lh is fixed so the highlight band
can be placed by row index, and body/pre carry no vertical padding so row 0 sits at
top 0. user-select on the popover lets the snippet be copied. */
.code-linker-hover,
.code-linker-embed {
overflow: hidden;
background: var(--background-primary);
border: 1px solid var(--background-modifier-border);
border-radius: var(--radius-m);
}
.code-linker-hover {
position: fixed;
z-index: var(--layer-popover);
max-width: min(720px, 90vw);
box-shadow: var(--shadow-s);
user-select: text;
-webkit-user-select: text;
}
.code-linker-hover.code-linker-hidden {
display: none;
}
.code-linker-embed {
margin: var(--p-spacing, 1em) 0;
}
.code-linker-hover-header,
.code-linker-embed-header {
padding: 4px 10px;
border-bottom: 1px solid var(--background-modifier-border);
color: var(--text-muted);
font-size: var(--font-ui-smaller);
font-family: var(--font-monospace);
white-space: nowrap;
}
.code-linker-embed-header {
overflow: hidden;
text-overflow: ellipsis;
cursor: pointer;
}
.code-linker-hover-body,
.code-linker-embed-body {
position: relative;
overflow: auto;
padding: 0;
font-family: var(--font-monospace);
font-size: var(--font-ui-smaller);
--cl-lh: 1.5em;
}
.code-linker-hover-body { max-height: 40vh; }
.code-linker-embed-body { max-height: 60vh; }
/* The .code-linker-code prefix raises specificity above the theme's / editor's own
`pre` rules — in Live Preview an embed is rendered where those would otherwise add a
top margin, border or a different line-height and push the code off the fixed band. */
.code-linker-code .code-linker-hover-body pre,
.code-linker-code .code-linker-embed-body pre {
position: relative;
z-index: 1;
margin: 0;
padding: 0 10px;
border: 0;
background: transparent;
font-size: inherit; /* keep it equal to the band's, so their em line heights match */
line-height: var(--cl-lh);
white-space: pre;
}
.code-linker-code .code-linker-hover-body code,
.code-linker-code .code-linker-embed-body code {
margin: 0;
padding: 0;
font-family: inherit;
font-size: inherit;
background: transparent;
color: var(--code-normal, var(--text-normal));
}
.code-linker-hover-band,
.code-linker-embed-band {
position: absolute;
left: 0;
right: 0;
top: 0; /* actual row offset (row-index * line-height) is set inline */
height: var(--cl-lh);
background: var(--code-linker-highlight-color, var(--text-selection));
z-index: 0;
pointer-events: none;
}
/* Prism token colours, shared by the hover popover and the inline embed (both carry
.code-linker-code). The popover sits outside Obsidian's markdown containers where the
theme's token CSS doesn't reach, so map the tokens to Obsidian's --code-* variables. */
.code-linker-code .token.comment,
.code-linker-code .token.prolog,
.code-linker-code .token.doctype,
.code-linker-code .token.cdata { color: var(--code-comment, var(--text-faint)); }
.code-linker-code .token.punctuation { color: var(--code-punctuation, var(--text-muted)); }
.code-linker-code .token.property,
.code-linker-code .token.tag,
.code-linker-code .token.constant,
.code-linker-code .token.symbol,
.code-linker-code .token.deleted { color: var(--code-tag, var(--text-normal)); }
.code-linker-code .token.boolean,
.code-linker-code .token.number { color: var(--code-value, var(--text-normal)); }
.code-linker-code .token.selector,
.code-linker-code .token.attr-name,
.code-linker-code .token.string,
.code-linker-code .token.char,
.code-linker-code .token.builtin,
.code-linker-code .token.inserted { color: var(--code-string, var(--text-normal)); }
.code-linker-code .token.operator,
.code-linker-code .token.entity,
.code-linker-code .token.url { color: var(--code-operator, var(--text-normal)); }
.code-linker-code .token.atrule,
.code-linker-code .token.attr-value,
.code-linker-code .token.keyword { color: var(--code-keyword, var(--text-accent)); }
.code-linker-code .token.function,
.code-linker-code .token.class-name { color: var(--code-function, var(--text-normal)); }
.code-linker-code .token.regex,
.code-linker-code .token.important,
.code-linker-code .token.variable { color: var(--code-property, var(--text-normal)); }
.code-linker-embed-error,
.code-linker-embed-note {
padding: 6px 10px;
color: var(--text-muted);
font-size: var(--font-ui-smaller);
}
.code-linker-embed-error { color: var(--text-error); }
/* Drifted line (stale) and renamed/removed symbol (broken), in both render modes.
A border-bottom rather than text-decoration: wavy/offset underlines render
inconsistently across platforms, so a plain border is the reliable choice. */
.code-linker-stale,
.code-linker-broken {
border-bottom-width: 1px;
border-bottom-style: var(--code-linker-mark-underline-style, dotted);
}
.code-linker-stale { border-bottom-color: var(--code-linker-stale-color, var(--text-warning)); }
.code-linker-broken { border-bottom-color: var(--code-linker-broken-color, var(--text-error)); }
/* Per-language searchable-entity rows, indented under their language toggle. */
.code-linker-kind-row {
margin-left: 1.5em;
border-left: 2px solid var(--background-modifier-border);
padding-left: 0.75em;
}
.code-linker-kind-row .setting-item-name {
font-size: 0.9em;
opacity: 0.85;
}