Skip to content

Commit

Permalink
Fix issue with numbered lists
Browse files Browse the repository at this point in the history
  • Loading branch information
Deni committed May 15, 2024
1 parent 3d20097 commit 67e17a6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
27 changes: 14 additions & 13 deletions assets/documents-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,29 @@ a {
/* Fancy numeration of nested numeric lists. (Based on https://stackoverflow.com/a/26245056) */

ol[type="1"] {
list-style-type: none;
padding-left: 1.5rem;
counter-reset: item;
padding-left: 0.5em;
}

ol[type="1"] > li {
display: table;
ol[type="1"] li {
position: relative;
display: block;
counter-increment: item;
width: 100%;
}

/* List item counter */
ol[type="1"] > li:before {
content: counters(item, ".") ". ";
display: table-cell;
padding-right: 0.5em;
width: 1px;
position: absolute;
right: 100%;
margin-right: 0.5rem;
content: counters(item, ".") ".";
}

li ol[type="1"] > li:before {
content: counters(item, ".") " ";
/* Nested list item (e.g. 1.2.3) */
li ol[type="1"] > li {
margin-left: 1.5rem;
}

li + li {
margin-top: 0.25em;
li ol[type="1"] > li:before {
content: counters(item, ".");
}
2 changes: 1 addition & 1 deletion bin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ convert_to_pdf() {
cp -r "$1/" build/

# Find Markdown files and build PDFs out of them.
find "build/$1" -name '*.md' | while read file; do
find "build/$1" -name '*Bylaws.md' | while read file; do
echo "Converting ${file#build/}..."

pdf_path="${file%.md}.pdf"
Expand Down

0 comments on commit 67e17a6

Please sign in to comment.