Skip to content

Commit d75ffc7

Browse files
Added nested list support
1 parent fa76f77 commit d75ffc7

File tree

9 files changed

+28
-18
lines changed

9 files changed

+28
-18
lines changed

assets/built/casper.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/built/casper.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/built/global.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/built/global.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/built/screen.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/built/screen.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/global.css

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,6 @@ video {
8888
body {
8989
line-height: 1;
9090
}
91-
ol,
92-
ul {
93-
list-style: none;
94-
}
9591
blockquote,
9692
q {
9793
quotes: none;
@@ -346,14 +342,6 @@ ol ul {
346342
margin: 0.5em 0 1em;
347343
}
348344

349-
ul {
350-
list-style: disc;
351-
}
352-
353-
ol {
354-
list-style: decimal;
355-
}
356-
357345
ul,
358346
ol {
359347
max-width: 100%;

assets/css/screen.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,6 +1479,18 @@ is the very first element in the post content */
14791479
box-shadow: 0 2px 6px -2px rgba(0,0,0,.1), 0 0 1px rgba(0,0,0,.4);
14801480
}
14811481

1482+
.gh-content .kg-nested-list-item {
1483+
list-style-type: none;
1484+
}
1485+
1486+
.gh-content ol ol li {
1487+
list-style-type: lower-alpha;
1488+
}
1489+
1490+
.gh-content ol ol ol li {
1491+
list-style-type: lower-roman;
1492+
}
1493+
14821494
@media (max-width: 650px) {
14831495
.gh-content > blockquote:not([class]),
14841496
.gh-content > ol,

assets/js/nested-list.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
(function () {
2+
const content = document.querySelector('.gh-content');
3+
if (!content) return;
4+
5+
content.querySelectorAll('ul li, ol li').forEach(function (item) {
6+
if (item.querySelector('ul, ol')) {
7+
item.classList.add('kg-nested-list-item');
8+
}
9+
});
10+
})();

0 commit comments

Comments
 (0)