Skip to content

Commit bb883c4

Browse files
committed
fix: restore list margins when nested within certain elements
1 parent 892c8a6 commit bb883c4

File tree

4 files changed

+12
-28
lines changed

4 files changed

+12
-28
lines changed

package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"postinstall": "cd playground && npm ci --ignore-scripts || true"
4848
},
4949
"dependencies": {
50-
"@diplodoc/cut-extension": "^0.7.1",
50+
"@diplodoc/cut-extension": "^0.7.2",
5151
"@diplodoc/file-extension": "^0.2.0",
5252
"@diplodoc/tabs-extension": "^3.5.0",
5353
"chalk": "^4.1.2",

src/scss/_common.scss

+7-9
Original file line numberDiff line numberDiff line change
@@ -287,12 +287,6 @@
287287

288288
dd {
289289
margin-left: 0;
290-
291-
& > ol:first-child,
292-
& > ul:first-child,
293-
& > dd:first-child {
294-
padding-left: 0;
295-
}
296290
}
297291

298292
ul,
@@ -325,9 +319,13 @@
325319
content: counter(list) '. ';
326320
}
327321

328-
// No direct ancestor (>) combinator to preserve legacy behavior
329-
ol.yfm_no-list-reset li::marker {
330-
content: unset;
322+
ol.yfm_no-list-reset {
323+
counter-reset: unset;
324+
325+
// No direct ancestor (>) combinator to preserve legacy behavior
326+
& li::marker {
327+
content: unset;
328+
}
331329
}
332330

333331
li {

src/scss/print/cut.scss

-14
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,3 @@
1717
}
1818
}
1919
}
20-
21-
.yfm-cut-content {
22-
.yfm:not(.yfm_no-list-reset) & ol {
23-
counter-reset: cut-list;
24-
25-
& > li {
26-
counter-increment: cut-list;
27-
28-
&::before {
29-
content: counters(cut-list, '.') '. ';
30-
}
31-
}
32-
}
33-
}

0 commit comments

Comments
 (0)