-
Notifications
You must be signed in to change notification settings - Fork 28
/
prism-live.css
66 lines (59 loc) · 1.29 KB
/
prism-live.css
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
div.prism-live {
position: relative;
box-sizing: border-box;
display: flex;
flex-flow: column;
}
textarea.prism-live,
pre.prism-live {
padding: .2rem .5rem;
box-sizing: border-box;
margin: 0;
}
textarea.prism-live {
position: absolute;
top: 0;
right: 0;
width: 100%;
height: 100%;
z-index: 1;
color: transparent;
/* color: hsla(0,0%,50%,.4); */
cursor: text;
white-space: pre;
border: 0;
outline: none;
background: transparent;
resize: none;
--selection-background: hsl(320, 80%, 25%);
--selection-color: hsla(0, 0%, 100%, .8);
}
@supports (not (caret-color: black)) and (-webkit-text-fill-color: black) {
textarea.prism-live {
color: inherit;
-webkit-text-fill-color: transparent;
}
}
/* Setting specific colors is needed
* because otherwise Firefox shows blank text */
textarea.prism-live::-moz-selection {
background: var(--selection-background);
color: var(--selection-color);
}
textarea.prism-live::selection {
background: var(--selection-background);
color: var(--selection-color);
}
pre.prism-live {
flex: 1;
position: relative;
pointer-events: none;
overflow: hidden;
max-height: 100%;
--scrollbar-width: 17px;
padding-bottom: var(--scrollbar-width);
padding-right: var(--scrollbar-width);
}
pre.prism-live > code:empty::before {
content: " "
}