|
8 | 8 | --root-bgcolor: #4c4f69; |
9 | 9 | --main-color: #444446; |
10 | 10 | --main-bgcolor: #ffffff; |
| 11 | + --topic-padding: 3px; |
11 | 12 | --color: #777777; |
12 | 13 | --bgcolor: #f6f6f6; |
13 | 14 | // --- |
|
31 | 32 | width: 0px; |
32 | 33 | height: 0px; |
33 | 34 | } |
| 35 | + .selected { |
| 36 | + box-shadow: 0 0 0 2px #4dc4ff; |
| 37 | + } |
| 38 | + .lhs { |
| 39 | + direction: rtl; |
| 40 | + me-tpc { |
| 41 | + direction: ltr; |
| 42 | + } |
| 43 | + } |
34 | 44 | .map-canvas { |
35 | 45 | height: 20000px; |
36 | 46 | width: 20000px; |
|
39 | 49 | transition: all 0.3s; |
40 | 50 | transform: scale(1); |
41 | 51 | background-color: var(--bgcolor); |
42 | | - .selected { |
43 | | - outline: 2px solid #4dc4ff; |
44 | | - } |
45 | 52 | me-root { |
46 | 53 | position: absolute; |
47 | 54 | padding: 10px var(--gap); |
|
59 | 66 | } |
60 | 67 | } |
61 | 68 | .box { |
| 69 | + // main node |
62 | 70 | & > me-wrapper { |
63 | | - // for main node |
64 | 71 | position: absolute; |
65 | 72 | & > me-parent { |
66 | 73 | margin: var(--gap); |
67 | 74 | background-color: var(--main-bgcolor); |
68 | 75 | border: 1px solid var(--main-color); |
69 | | - padding: 8px var(--gap); |
70 | 76 | border-radius: var(--main-radius); |
| 77 | + padding: 0; |
71 | 78 | & > me-tpc { |
| 79 | + border-radius: var(--main-radius); |
72 | 80 | color: var(--main-color); |
| 81 | + padding: 8px var(--gap); |
| 82 | + #input-box { |
| 83 | + padding: 8px var(--gap); |
| 84 | + } |
73 | 85 | } |
74 | 86 | } |
75 | 87 | } |
76 | | - .lhs { |
77 | | - direction: rtl; |
78 | | - me-tpc { |
79 | | - direction: ltr; |
80 | | - } |
81 | | - } |
82 | | - me-wrapper { |
83 | | - display: block; |
84 | | - pointer-events: none; |
85 | | - } |
86 | | - me-children, |
87 | | - me-parent { |
88 | | - display: inline-block; |
89 | | - vertical-align: middle; |
90 | | - } |
91 | | - me-parent { |
| 88 | + } |
| 89 | + me-wrapper { |
| 90 | + display: block; |
| 91 | + pointer-events: none; |
| 92 | + } |
| 93 | + me-children, |
| 94 | + me-parent { |
| 95 | + display: inline-block; |
| 96 | + vertical-align: middle; |
| 97 | + } |
| 98 | + me-parent { |
| 99 | + position: relative; |
| 100 | + cursor: pointer; |
| 101 | + padding: 6px var(--gap); |
| 102 | + margin-top: 10px; |
| 103 | + me-tpc { |
92 | 104 | position: relative; |
93 | | - cursor: pointer; |
94 | | - padding: 6px var(--gap); |
95 | | - margin-top: 10px; |
96 | | - me-tpc { |
97 | | - position: relative; |
98 | | - display: block; |
99 | | - border-radius: 3px; |
100 | | - color: var(--color); |
101 | | - pointer-events: all; |
102 | | - max-width: 800px; |
103 | | - white-space: pre-wrap; |
104 | | - line-height: 1.2; // assure the line-height consistency between different languages |
105 | | - .tags { |
106 | | - direction: ltr; |
107 | | - span { |
108 | | - display: inline-block; |
109 | | - border-radius: 3px; |
110 | | - padding: 2px 4px; |
111 | | - background: #d6f0f8; |
112 | | - color: #276f86; |
113 | | - margin: 0px; |
114 | | - font-size: 12px; |
115 | | - height: 16px; |
116 | | - line-height: 16px; |
117 | | - margin-right: 3px; |
118 | | - margin-top: 2px; |
119 | | - } |
120 | | - } |
121 | | - .icons { |
| 105 | + display: block; |
| 106 | + border-radius: 3px; |
| 107 | + color: var(--color); |
| 108 | + pointer-events: all; |
| 109 | + max-width: 800px; |
| 110 | + white-space: pre-wrap; |
| 111 | + padding: var(--topic-padding); |
| 112 | + line-height: 1.2; // assure the line-height consistency between different languages |
| 113 | + .tags { |
| 114 | + direction: ltr; |
| 115 | + span { |
122 | 116 | display: inline-block; |
123 | | - direction: ltr; |
124 | | - margin-right: 10px; |
125 | | - } |
126 | | - // drag preview |
127 | | - .insert-preview { |
128 | | - position: absolute; |
129 | | - width: 100%; |
130 | | - left: 0px; |
131 | | - z-index: 9; |
132 | | - } |
133 | | - .show { |
134 | | - background: #7ad5ff; |
135 | | - pointer-events: none; // 不加会识别为不可移动 |
136 | | - opacity: 0.7; |
137 | | - } |
138 | | - .before { |
139 | | - height: 14px; |
140 | | - top: -14px; |
141 | | - } |
142 | | - .in { |
143 | | - height: 100%; |
144 | | - top: 0px; |
145 | | - } |
146 | | - .after { |
147 | | - height: 14px; |
148 | | - bottom: -14px; |
| 117 | + border-radius: 3px; |
| 118 | + padding: 2px 4px; |
| 119 | + background: #d6f0f8; |
| 120 | + color: #276f86; |
| 121 | + margin: 0px; |
| 122 | + font-size: 12px; |
| 123 | + height: 16px; |
| 124 | + line-height: 16px; |
| 125 | + margin-right: 3px; |
| 126 | + margin-top: 2px; |
149 | 127 | } |
150 | 128 | } |
151 | | - me-epd { |
| 129 | + .icons { |
| 130 | + display: inline-block; |
| 131 | + direction: ltr; |
| 132 | + margin-right: 10px; |
| 133 | + } |
| 134 | + // drag preview |
| 135 | + .insert-preview { |
152 | 136 | position: absolute; |
153 | | - height: 18px; |
154 | | - width: 18px; |
155 | | - opacity: 0.8; |
156 | | - background-image: url('./icons/add-circle.svg'); |
157 | | - background-repeat: no-repeat; |
158 | | - background-size: contain; |
159 | | - background-position: center; |
160 | | - |
161 | | - pointer-events: all; |
| 137 | + width: 100%; |
| 138 | + left: 0px; |
162 | 139 | z-index: 9; |
163 | | - &.minus { |
164 | | - background-image: url('./icons/minus-circle.svg') !important; |
165 | | - transition: all 0.3s; |
166 | | - opacity: 0; |
167 | | - &:hover { |
168 | | - opacity: 0.8; |
169 | | - } |
| 140 | + } |
| 141 | + .show { |
| 142 | + background: #7ad5ff; |
| 143 | + pointer-events: none; // 不加会识别为不可移动 |
| 144 | + opacity: 0.7; |
| 145 | + } |
| 146 | + .before { |
| 147 | + height: 14px; |
| 148 | + top: -14px; |
| 149 | + } |
| 150 | + .in { |
| 151 | + height: 100%; |
| 152 | + top: 0px; |
| 153 | + } |
| 154 | + .after { |
| 155 | + height: 14px; |
| 156 | + bottom: -14px; |
| 157 | + } |
| 158 | + } |
| 159 | + me-epd { |
| 160 | + position: absolute; |
| 161 | + height: 18px; |
| 162 | + width: 18px; |
| 163 | + opacity: 0.8; |
| 164 | + background-image: url('./icons/add-circle.svg'); |
| 165 | + background-repeat: no-repeat; |
| 166 | + background-size: contain; |
| 167 | + background-position: center; |
| 168 | + |
| 169 | + pointer-events: all; |
| 170 | + z-index: 9; |
| 171 | + &.minus { |
| 172 | + background-image: url('./icons/minus-circle.svg') !important; |
| 173 | + transition: all 0.3s; |
| 174 | + opacity: 0; |
| 175 | + &:hover { |
| 176 | + opacity: 0.8; |
170 | 177 | } |
171 | 178 | } |
172 | 179 | } |
173 | 180 | } |
| 181 | + |
174 | 182 | // iconfont |
175 | 183 | .icon { |
176 | 184 | width: 1em; |
|
217 | 225 | position: absolute; |
218 | 226 | top: 0; |
219 | 227 | left: 0; |
| 228 | + padding: var(--topic-padding); |
220 | 229 | background-color: #fff; |
221 | 230 | color: #666666; |
222 | 231 | width: max-content; // let words expand the div and keep max length at the same time |
|
225 | 234 | direction: ltr; |
226 | 235 | user-select: auto; |
227 | 236 | } |
228 | | -} |
229 | 237 |
|
230 | | -me-tpc > img { |
231 | | - pointer-events: none; |
232 | | - display: block; |
233 | | -} |
| 238 | + me-tpc > img { |
| 239 | + pointer-events: none; |
| 240 | + display: block; |
| 241 | + margin-top: 8px; |
| 242 | + } |
234 | 243 |
|
235 | | -.circle { |
236 | | - position: absolute; |
237 | | - height: 10px; |
238 | | - width: 10px; |
239 | | - margin-top: -5px; |
240 | | - margin-left: -5px; |
241 | | - border-radius: 100%; |
242 | | - background: #aaa; |
243 | | - cursor: pointer; |
| 244 | + .circle { |
| 245 | + position: absolute; |
| 246 | + height: 10px; |
| 247 | + width: 10px; |
| 248 | + margin-top: -5px; |
| 249 | + margin-left: -5px; |
| 250 | + border-radius: 100%; |
| 251 | + background: #aaa; |
| 252 | + cursor: pointer; |
| 253 | + } |
244 | 254 | } |
0 commit comments