Skip to content

Commit 0bd01ce

Browse files
committed
style: add focused styles
1 parent 0a7c48b commit 0bd01ce

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

styles.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,22 @@ code>span.line.highlighted.error {
268268
code>span.line.highlighted.warning {
269269
background-color: var(--vp-code-line-warning-color)
270270
}
271+
.has-focused code>span.line:not(.focused),
272+
.has-focused-lines code>span.line:not(.has-focus) {
273+
filter:blur(.095rem);
274+
opacity:.4;
275+
transition:filter .35s,opacity .35s
276+
}
277+
.has-focused code>span.line:not(.focused),
278+
.has-focused-lines code>span.line:not(.has-focus) {
279+
opacity:.7;
280+
transition:filter .35s,opacity .35s
281+
}
282+
.has-focused:hover code>span.line:not(.focused),
283+
.has-focused-lines:hover code>span.line:not(.has-focus) {
284+
filter:blur(0);
285+
opacity:1
286+
}
271287

272288
/* chore fix: keep color magin zero */
273289
code>span.line {

0 commit comments

Comments
 (0)