-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Labels
change requestIssue requests a new feature or improvementIssue requests a new feature or improvementresolvedIssue is resolved, yet unreleased if openIssue is resolved, yet unreleased if open
Description
Context
I'm using a Markdown extension that allows writing different types of lists.
- Lower alphabetic:
<ol type="a"> - Upper alphabetic:
<ol type="A"> - Lower roman:
<ol type="i"> - Upper roman:
<ol type="I">
Description
The following CSS overrides the default list styles, so the first nested <ol> will always be rendered as alphabetic regarding the type attribute.
mkdocs-material/src/templates/assets/stylesheets/main/_typeset.scss
Lines 331 to 339 in c6286de
| // Nested ordered list | |
| ol { | |
| list-style-type: lower-alpha; | |
| // Triply nested ordered list | |
| ol { | |
| list-style-type: lower-roman; | |
| } | |
| } |
Could this be set only if <ol> doesn't have a specific type?
ol, ul {
// Nested ordered list
ol:not([type]) {
list-style-type: lower-alpha;
}
ol, ul {
// Triply nested ordered list
ol:not([type]) {
list-style-type: lower-roman;
}
}
}Related links
- pymdown-extensions discussion: Add extension to support letter lists
- pymdown-extensions pull request: Add fancylist extension
- pymdown-fancylists (will be removed once pymdown-extensions merges this feature).
Use Cases
For example, writing:
1. List item
2. List item
1. List item
2. List item
3. List item
Will result on:
1. List item
2. List item
a. List item
b. List item
c. List item
Instead of:
1. List item
2. List item
1. List item
2. List item
3. List item
Which might not always be desirable.
Visuals
No response
Before submitting
- I have read and followed the change request guidelines.
- I have verified that my idea is a change request and not a bug report.
- I have ensured that, to the best of my knowledge, my idea will benefit the entire community.
- I have included relevant links to the documentation, related issues, and discussions to underline the need for my idea.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
change requestIssue requests a new feature or improvementIssue requests a new feature or improvementresolvedIssue is resolved, yet unreleased if openIssue is resolved, yet unreleased if open