Skip to content

Commit c50a4f1

Browse files
committed
fix: list element markers displaying at the bottom
1 parent b9310d7 commit c50a4f1

7 files changed

Lines changed: 23 additions & 14 deletions
0 Bytes
Loading
29 Bytes
Loading
-26 Bytes
Loading
-6 Bytes
Loading
32 Bytes
Loading
0 Bytes
Loading

src/web/EnrichedText.css

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,11 @@
138138
content: '';
139139
position: absolute;
140140
left: calc(-1 * var(--et-ul-gap-width, 16px) - var(--et-ul-bullet-size, 8px));
141-
bottom: 0.4em;
142-
@supports (bottom: 0.5lh) {
143-
bottom: 0.5lh;
141+
top: 0.6em;
142+
@supports (top: 0.5lh) {
143+
top: 0.5lh;
144144
}
145-
146-
transform: translateY(50%);
145+
transform: translateY(-50%);
147146
width: var(--et-ul-bullet-size, 8px);
148147
height: var(--et-ul-bullet-size, 8px);
149148
border-radius: 50%;
@@ -158,23 +157,26 @@
158157
padding-left: calc(
159158
var(--et-ol-margin-left, 16px) + var(--et-ol-gap-width, 16px)
160159
);
161-
counter-reset: eti-ol;
160+
counter-reset: et-ol;
162161
}
163162

164163
.eti-editor ol > li,
165164
.et-view ol > li {
166165
position: relative;
167-
counter-increment: eti-ol;
166+
counter-increment: et-ol;
168167
min-height: 1lh;
169168
}
170169

171170
.eti-editor ol > li::before,
172171
.et-view ol > li::before {
173-
content: counter(eti-ol) '.';
172+
content: counter(et-ol) '.';
174173
position: absolute;
175174
left: calc(-1 * var(--et-ol-gap-width, 16px));
176-
bottom: 0;
177-
transform: translateX(-50%);
175+
top: 0.6em;
176+
@supports (top: 0.5lh) {
177+
top: 0.5lh;
178+
}
179+
transform: translate3d(-50%, -50%, 0);
178180
color: var(--et-ol-marker-color, currentColor);
179181
font-weight: var(--et-ol-marker-font-weight, inherit);
180182
white-space: nowrap;
@@ -238,17 +240,17 @@
238240
left: calc(
239241
-1 * var(--et-checkbox-gap-width, 16px) - var(--et-checkbox-box-size, 24px)
240242
);
241-
transform: translateY(50%);
242243
display: inline-flex;
243244
align-items: center;
244245
gap: 0;
245246
margin: 0;
246247
padding: 0;
247248
user-select: none;
248-
bottom: 0.4em;
249-
@supports (bottom: 0.5lh) {
250-
bottom: 0.5lh;
249+
top: 0.6em;
250+
@supports (top: 0.5lh) {
251+
top: 0.5lh;
251252
}
253+
transform: translateY(-50%);
252254
}
253255

254256
.eti-editor ul[data-type='checkboxList'] > li > label input[type='checkbox'] {
@@ -280,6 +282,13 @@
280282
left: calc(
281283
-1 * var(--et-checkbox-gap-width, 16px) - var(--et-checkbox-box-size, 24px)
282284
);
285+
font-size: inherit;
286+
line-height: inherit;
287+
top: 0.6em;
288+
@supports (top: 0.5lh) {
289+
top: 0.5lh;
290+
}
291+
transform: translateY(-50%);
283292
width: var(--et-checkbox-box-size, 24px);
284293
height: var(--et-checkbox-box-size, 24px);
285294
margin: 0 var(--et-checkbox-gap-width, 16px) 0 0;

0 commit comments

Comments
 (0)