+22 -1 +/-3 browse
1 | diff --git a/docsite/index.html b/docsite/index.html |
2 | index 23527f7..f06d727 100644 |
3 | --- a/docsite/index.html |
4 | +++ b/docsite/index.html |
5 | @@ -127,7 +127,7 @@ |
6 | <pre class="language-css"><code> |
7 | @import "https://unpkg.com/open-props"; |
8 | </code></pre> |
9 | - <pre class="language-css"><code> |
10 | + <pre class="language-css" data-line="2-4"><code> |
11 | .card { |
12 | border-radius: var(--radius-2); |
13 | padding: var(--size-fluid-3); |
14 | diff --git a/docsite/index.js b/docsite/index.js |
15 | index 35455e8..f69b032 100644 |
16 | --- a/docsite/index.js |
17 | +++ b/docsite/index.js |
18 | @@ -1,5 +1,6 @@ |
19 | import 'https://cdnjs.cloudflare.com/ajax/libs/prism/1.16.0/prism.min.js' |
20 | import 'https://cdnjs.cloudflare.com/ajax/libs/prism/1.16.0/plugins/normalize-whitespace/prism-normalize-whitespace.min.js' |
21 | + import 'https://cdnjs.cloudflare.com/ajax/libs/prism/1.16.0/plugins/line-highlight/prism-line-highlight.min.js' |
22 | |
23 | import '/js/easing.js' |
24 | import '/js/animations.js' |
25 | diff --git a/docsite/syntax-highlight.css b/docsite/syntax-highlight.css |
26 | index bb9fb91..9305fa9 100644 |
27 | --- a/docsite/syntax-highlight.css |
28 | +++ b/docsite/syntax-highlight.css |
29 | @@ -103,3 +103,23 @@ code.language-css { |
30 | } |
31 | } |
32 | } |
33 | + |
34 | + pre[data-line] { |
35 | + position: relative; |
36 | + } |
37 | + |
38 | + .line-highlight { |
39 | + position: absolute; |
40 | + left: 0; |
41 | + right: 0; |
42 | + padding: inherit 0; |
43 | + margin-top: 1em; |
44 | + pointer-events: none; |
45 | + line-height: inherit; |
46 | + white-space: pre; |
47 | + background: hsl(0 0% 100% / 15%); |
48 | + |
49 | + @nest [data-theme="light"] & { |
50 | + background: hsl(0 0% 0% / 10%); |
51 | + } |
52 | + } |
53 | \ No newline at end of file |