-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
67 lines (57 loc) · 2.17 KB
/
Copy pathstyle.css
File metadata and controls
67 lines (57 loc) · 2.17 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
/* The existing text prompt */
#txt2img_prompt > label > textarea,
#txt2img_neg_prompt > label > textarea,
#img2img_prompt > label > textarea,
#img2img_neg_prompt > label > textarea {
/* Place the textarea on top of the syntax highlighting to allow the user to edit the text */
z-index: 1;
/* Then make the textarea invisible, keeping the caret intact but hiding the text,
allowing the syntax highlighting colors to take over */
color: transparent;
background: transparent;
caret-color: white;
height: auto !important;
}
/* The new syntax-highlighted prompt */
#txt2img_prompt > label > div.sd-webui-syntax-highlighting,
#txt2img_neg_prompt > label > div.sd-webui-syntax-highlighting,
#img2img_prompt > label > div.sd-webui-syntax-highlighting,
#img2img_neg_prompt > label > div.sd-webui-syntax-highlighting {
background: var(--input-background-fill);
border: 1px solid transparent;
overflow-y: hidden;
}
/* Shared values between the original text prompt and the new syntax-highlighted prompt */
#txt2img_prompt > label > textarea,
#txt2img_neg_prompt > label > textarea,
#img2img_prompt > label > textarea,
#img2img_neg_prompt > label > textarea,
#txt2img_prompt > label > div.sd-webui-syntax-highlighting,
#txt2img_neg_prompt > label > div.sd-webui-syntax-highlighting,
#img2img_prompt > label > div.sd-webui-syntax-highlighting,
#img2img_neg_prompt > label > div.sd-webui-syntax-highlighting {
position: absolute;
inset: 0;
font-family: monospace;
font-size: 16px;
line-height: 1.3;
padding: 5px;
border-width: 1px;
border-radius: var(--input-radius);
}
/* Due to the use of position: absolute, we have to manually specify a height */
#txt2img_prompt,
#txt2img_neg_prompt,
#img2img_prompt,
#img2img_neg_prompt {
min-height: 260px;
}
/* Edge-case for some browser styles */
#txt2img_prompt > label > div.sd-webui-syntax-highlighting > pre,
#txt2img_neg_prompt > label > div.sd-webui-syntax-highlighting > pre,
#img2img_prompt > label > div.sd-webui-syntax-highlighting > pre,
#img2img_neg_prompt > label > div.sd-webui-syntax-highlighting > pre {
margin: 0;
overflow-wrap: break-word;
white-space: pre-wrap;
}