1 | pre[data-line] {
|
2 | position: relative;
|
3 | padding: 1em 0 1em 3em;
|
4 | }
|
5 |
|
6 | .line-highlight {
|
7 | position: absolute;
|
8 | left: 0;
|
9 | right: 0;
|
10 | padding: inherit 0;
|
11 | margin-top: 1em;
|
12 |
|
13 | background: hsla(24, 20%, 50%,.08);
|
14 | background: linear-gradient(to right, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0));
|
15 |
|
16 | pointer-events: none;
|
17 |
|
18 | line-height: inherit;
|
19 | white-space: pre;
|
20 | }
|
21 |
|
22 | .line-highlight:before,
|
23 | .line-highlight[data-end]:after {
|
24 | content: attr(data-start);
|
25 | position: absolute;
|
26 | top: .4em;
|
27 | left: .6em;
|
28 | min-width: 1em;
|
29 | padding: 0 .5em;
|
30 | background-color: hsla(24, 20%, 50%,.4);
|
31 | color: hsl(24, 20%, 95%);
|
32 | font: bold 65%/1.5 sans-serif;
|
33 | text-align: center;
|
34 | vertical-align: .3em;
|
35 | border-radius: 999px;
|
36 | text-shadow: none;
|
37 | box-shadow: 0 1px white;
|
38 | }
|
39 |
|
40 | .line-highlight[data-end]:after {
|
41 | content: attr(data-end);
|
42 | top: auto;
|
43 | bottom: .4em;
|
44 | }
|
45 |
|
46 | .line-numbers .line-highlight:before,
|
47 | .line-numbers .line-highlight:after {
|
48 | content: none;
|
49 | }
|