forked from scripcrypt/textarea-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sweEditor.css
110 lines (103 loc) · 3 KB
/
sweEditor.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
@import url('https://fonts.googleapis.com/css2?family=M+PLUS+1+Code&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Sawarabi+Gothic&display=swap');
:root {
--sweEditor-background-color: rgb(34, 34, 34);
--sweEditor-font-color: rgb(255, 255, 255);
--sweEditor-border-color: rgb(120, 120, 120);
--sweEditor-font-family: 'M PLUS 1 Code', monospace;
--sweEditor-font-size: 14px;
--sweEditor-font-weight: 400;
--sweEditor-letter-spacing: 1px;
--sweEditor-line-height: 24px;
--sweEditor-lineNumber-background-color: rgb(24, 24, 24);
--sweEditor-lineNumber-font-color: rgb(160, 160, 160);
--sweEditor-lineNumber-borderRight-color: rgb(64, 64, 64);
--sweEditor-lineNumber-font-family: 'Sawarabi Gothic', sans-serif;
--sweEditor-lineNumber-font-size: 14px;
--sweEditor-lineNumber-font-weight: 300;
--sweEditor-lineNumber-line-height: 24px;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
background-color: rgb(84, 84, 84);
}
#fugafuga {
width: 800px;
height: 400px;
}
.sweEditor_frame {
display: inline-flex;
padding: 0 5px 0 0;
margin: 10px;
border: 1px solid var(--sweEditor-border-color);
background-color: var(--sweEditor-background-color);
scrollbar-width: 3px;
scrollbar-color: #999 transparent;
overflow: auto;
}
.sweEditor_frame::-webkit-scrollbar {
width: 3px;
height: 3px;
}
.sweEditor_frame::-webkit-scrollbar-track{
background-color: transparent;
}
.sweEditor_frame::-webkit-scrollbar-thumb{
background-color: #999;
}
.sweEditor_frame .line_number_frame {
width: 80px;
border-right: 1px solid var(--sweEditor-lineNumber-borderRight-color);
background-color: var(--sweEditor-lineNumber-background-color);
padding: 4px 16px 100% 0;
font-family: var(--sweEditor-lineNumber-font-family);
font-weight: var(--sweEditor-lineNumber-font-weight);
line-height: var(--sweEditor-lineNumber-line-height);
}
.sweEditor_frame .line_number_frame > .line_number {
text-align: right;
background-color: var(--sweEditor-lineNumber-background-color);
color: var(--sweEditor-lineNumber-font-color);
font-size: var(--sweEditor-lineNumber-font-size);
}
.sweEditor_frame textarea {
padding: 5px;
width: 100%;
box-sizing: content-box;
background-color: var(--sweEditor-background-color);
color: #fff;
font-family: var(--sweEditor-font-family);
font-weight: var(--sweEditor-font-weight);
font-size: var(--sweEditor-font-size);
line-height: 24px;
letter-spacing: var(--sweEditor-letter-spacing);
border: none;
word-break: break-all;
resize: none;
overflow: hidden;
z-index: 2;
}
.sweEditor_frame textarea:focus {
outline: none;
}
.sweEditor_frame textarea::-webkit-scrollbar {
width: 0;
height: 0;
}
.sweEditor_frame .letter_size_measure {
display: inline-block;
top: 20px;
left: 60px;
box-sizing: content-box;
padding: 0;
font-family: var(--sweEditor-font-family);
font-weight: var(--sweEditor-font-weight);
font-size: var(--sweEditor-font-size);
line-height: 24px;
letter-spacing: var(--sweEditor-letter-spacing);
color: transparent;
background-color: transparent;
z-index: -2;
}