Merge pull request #446 from pdmosses/aliign-dd

Fix list alignment
This commit is contained in:
Patrick Marsceill 2020-10-12 11:19:38 -04:00 committed by GitHub
commit 215655187f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 253 additions and 0 deletions

View File

@ -130,6 +130,38 @@
grid-column: 2;
margin-bottom: 0;
margin-left: 1em;
blockquote,
div,
dl,
dt,
h1,
h2,
h3,
h4,
h5,
h6,
li,
ol,
p,
pre,
table,
ul,
.table-wrapper {
&:first-child {
margin-top: 0;
}
}
}
dd,
ol,
ul {
dl:first-child {
dt:first-child,
dd:nth-child(2) {
margin-top: 0;
}
}
}
.anchor-heading {

83
docs/tests/styling/dl.md Normal file
View File

@ -0,0 +1,83 @@
---
layout: default
title: Description lists
parent: Styling
grand_parent: Tests
---
# Description lists
The first child element of each `dd` element in a `dl` list should be aligned with the preceding `dt` element in the following examples.
term
: paragraph text
paragraph text
term
: ### Header
paragraph text
term
: > block quote
paragraph text
term
: ```sh
fenced code block
```
paragraph text
term
: + unordered list item
+ unordered list item
paragraph text
term
: 1. ordered list item
2. ordered list item
paragraph text
term
: sub-term
: sub-description
sub-term
: sub-description
paragraph text
term
: |-----------------+------------+-----------------+----------------|
| Default aligned |Left aligned| Center aligned | Right aligned |
|-----------------|:-----------|:---------------:|---------------:|
| First body part |Second cell | Third cell | fourth cell |
| Second line |foo | **strong** | baz |
| Third line |quux | baz | bar |
|-----------------+------------+-----------------+----------------|
| Second body | | | |
| 2 line | | | |
|=================+============+=================+================|
| Footer row | | | |
|-----------------+------------+-----------------+----------------|
paragraph text
term
: ***
paragraph text

View File

@ -0,0 +1,8 @@
---
layout: default
title: Styling
parent: Tests
has_children: true
---
# Styling

65
docs/tests/styling/ol.md Normal file
View File

@ -0,0 +1,65 @@
---
layout: default
title: Ordered lists
parent: Styling
grand_parent: Tests
---
# Ordered lists
The first child element of each `li` element in an `ol` list should be aligned with the preceding label in the following examples.
1. paragraph text
paragraph text
1. ### Header
paragraph text
1. > block quote
paragraph text
1. ```sh
fenced code block
```
paragraph text
1. + unordered list item
+ unordered list item
paragraph text
1. 1. ordered list item
2. ordered list item
paragraph text
1. term
: description
term
: description
paragraph text
1. |-----------------+------------+-----------------+----------------|
| Default aligned |Left aligned| Center aligned | Right aligned |
|-----------------|:-----------|:---------------:|---------------:|
| First body part |Second cell | Third cell | fourth cell |
| Second line |foo | **strong** | baz |
| Third line |quux | baz | bar |
|-----------------+------------+-----------------+----------------|
| Second body | | | |
| 2 line | | | |
|=================+============+=================+================|
| Footer row | | | |
|-----------------+------------+-----------------+----------------|
paragraph text
1. ***
paragraph text

65
docs/tests/styling/ul.md Normal file
View File

@ -0,0 +1,65 @@
---
layout: default
title: Unordered lists
parent: Styling
grand_parent: Tests
---
# Unordered lists
The first child element of each `li` element in a `ul` list should be aligned with the preceding bullet in the following examples.
- paragraph text
paragraph text
- ### Header
paragraph text
- > block quote
paragraph text
- ```sh
fenced code block
```
paragraph text
- + unordered list item
+ unordered list item
paragraph text
- 1. ordered list item
2. ordered list item
paragraph text
- term
: description
term
: description
paragraph text
- |-----------------+------------+-----------------+----------------|
| Default aligned |Left aligned| Center aligned | Right aligned |
|-----------------|:-----------|:---------------:|---------------:|
| First body part |Second cell | Third cell | fourth cell |
| Second line |foo | **strong** | baz |
| Third line |quux | baz | bar |
|-----------------+------------+-----------------+----------------|
| Second body | | | |
| 2 line | | | |
|=================+============+=================+================|
| Footer row | | | |
|-----------------+------------+-----------------+----------------|
paragraph text
- ***
paragraph text