-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Expand file tree
/
Copy pathtextarea.less
More file actions
72 lines (62 loc) · 1.43 KB
/
textarea.less
File metadata and controls
72 lines (62 loc) · 1.43 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
67
68
69
70
71
72
@import "../../../vars.less"; // var and mixin
.w-e-text-container {
color: @textarea-color;
background-color: @textarea-bg-color;
position: relative;
height: 100%;
}
.no-scroll{
position: absolute;
width: 100%;
}
.w-e-text-container .w-e-scroll {
height: 100%;
// overflow-y: auto; // 在 js 中设置,根据 config 判断是否增加 scroll
-webkit-overflow-scrolling: touch;
}
.w-e-text-container [data-slate-editor] {
outline: 0;
white-space: pre-wrap; /* 【重要】可以显示空格,在连续多空格的情况下 */
word-wrap: break-word;
padding: 0 10px;
border-top: 1px solid transparent; // 防止 margin-top 溢出
min-height: 100%;
p {
margin: 15px 0;
}
h1,h2,h3,h4,h5 {
margin: 20px 0 20px 0;
}
img {
max-width: 100%;
min-width: 20px;
min-height: 20px;
cursor: default;
display: inline !important;
}
span {
text-indent: 0; // issues#4536
}
// 选中的节点
[data-selected="true"] {
box-shadow: 0 0 0 2px @textarea-selected-border-color;
}
}
.w-e-text-placeholder {
color: @textarea-slight-color;
position: absolute;
font-style: italic;
width: 90%;
left: 10px;
top: 17px;
pointer-events: none; // 忽略鼠标行为,重要
user-select: none;
}
.w-e-max-length-info {
position: absolute;
color: @textarea-slight-color;
bottom: 0.5em;
right: 1em;
pointer-events: none; // 忽略鼠标行为,重要
user-select: none;
}