summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Amirault <mamirault@gitlab.com>2019-08-12 15:46:00 +0900
committerMarcel Amirault <mamirault@gitlab.com>2019-08-12 15:46:00 +0900
commit76966c3d931d5fab3a928ae76507bf2c5b710fd4 (patch)
treee81be32b425f6591b3ecfce53c4918bd9555b6d1
parent68c7610619d58b871156e5795865dfd40c140dfd (diff)
downloadgitlab-ce-docs-styleguide-lists.tar.gz
Expand nested list detailsdocs-styleguide-lists
-rw-r--r--doc/development/documentation/styleguide.md29
1 files changed, 23 insertions, 6 deletions
diff --git a/doc/development/documentation/styleguide.md b/doc/development/documentation/styleguide.md
index f2585074e9c..0f017d8f5e9 100644
--- a/doc/development/documentation/styleguide.md
+++ b/doc/development/documentation/styleguide.md
@@ -361,13 +361,13 @@ Don't (third item should have a `.` to match the first and second items):
It is possible to nest items under a list item, so that they render with the same indentation
as the list item. This can be done with:
-- [code blocks](#code-blocks)
-- [blockquotes](#blockquotes)
-- [alert boxes](#alert-boxes)
-- [images](#images)
+- [Code blocks](#code-blocks)
+- [Blockquotes](#blockquotes)
+- [Alert boxes](#alert-boxes)
+- [Images](#images)
Items nested in lists should always align with the first character of the list item.
-In unordered lists (using `-`), this means two spaces:
+In unordered lists (using `-`), this means two spaces for each level of indentation:
~~~md
- Unordered list item 1
@@ -390,7 +390,7 @@ In unordered lists (using `-`), this means two spaces:
![an image that will nest inside list item 4](image.png)
~~~
-For ordered lists use three spaces to align with the first character of the list
+For ordered lists, use three spaces for each level of indentation:
~~~md
1. Ordered list item 1
@@ -413,6 +413,23 @@ For ordered lists use three spaces to align with the first character of the list
![an image that will nest inside list item 4](image.png)
~~~
+You can nest full lists inside other lists using the same rules as above. If you wish
+to mix types, that is also possible, as long as you don't mix items at the same level:
+
+```
+1. Ordered list item one.
+1. Ordered list item two.
+ - Nested unordered list item one.
+ - Nested unordered list item two.
+1. Ordered list item three.
+
+- Unordered list item one.
+- Unordered list item two.
+ 1. Nested ordered list item one.
+ 1. Nested ordered list item two.
+- Unordered list item three.
+```
+
## Quotes
Valid for markdown content only, not for frontmatter entries: