Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore numbering for TOC, add TOC to keyCommands (#16226)
Fixes #16059 Closes #16106 Summary of the issue: Due to markdown limitations, numbered headings and a numbered table of contents was removed from the user and dev guide when migrating from t2t to markdown. However, these can be restored with CSS. Description of user facing changes Restores numbered headings to the table of contents and the headings within the user guide and developer guide. Added TOC to key commands guide. Numbered heading are avoided as they don't match the user guide and may be misleading.
- Loading branch information
Showing
6 changed files
with
184 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
/* Numbering for table of contents. | ||
.toc > ul > li is used as the base for the numbering. | ||
This is because the first and only first level TOC element is the heading for the page, so it should be skipped. | ||
*/ | ||
.toc > ul > li > ul { | ||
list-style-type: none; | ||
counter-reset: toc1-counter; | ||
} | ||
|
||
.toc > ul > li > ul > li a:before { | ||
counter-increment: toc1-counter; | ||
content: counter(toc1-counter) ". "; | ||
} | ||
|
||
.toc > ul > li > ul > li > ul { | ||
list-style-type: none; | ||
counter-reset: toc2-counter; | ||
} | ||
|
||
.toc > ul > li > ul > li > ul > li a:before { | ||
counter-increment: toc2-counter; | ||
content: counter(toc1-counter) "." counter(toc2-counter) ". "; | ||
} | ||
|
||
.toc > ul > li > ul > li > ul > li > ul { | ||
list-style-type: none; | ||
counter-reset: toc3-counter; | ||
} | ||
|
||
.toc > ul > li > ul > li > ul > li > ul > li a:before { | ||
counter-increment: toc3-counter; | ||
content: counter(toc1-counter) "." counter(toc2-counter) "." counter(toc3-counter) ". "; | ||
} | ||
|
||
.toc > ul > li > ul > li > ul > li > ul > li > ul { | ||
list-style-type: none; | ||
counter-reset: toc4-counter; | ||
} | ||
|
||
.toc > ul > li > ul > li > ul > li > ul > li > ul > li a:before { | ||
counter-increment: toc4-counter; | ||
content: counter(toc1-counter) "." counter(toc2-counter) "." counter(toc3-counter) "." counter(toc4-counter) ". "; | ||
} | ||
|
||
.toc > ul > li > ul > li > ul > li > ul > li > ul > li > ul { | ||
list-style-type: none; | ||
counter-reset: toc5-counter; | ||
} | ||
|
||
.toc > ul > li > ul > li > ul > li > ul > li > ul > li > ul > li a:before { | ||
counter-increment: toc5-counter; | ||
content: counter(toc1-counter) "." counter(toc2-counter) "." counter(toc3-counter) "." counter(toc4-counter) "." counters(toc5-counter) ". "; | ||
} | ||
|
||
/* RTL */ | ||
|
||
:lang(ar) .toc > ul > li > ul > li a:before, | ||
:lang(fa) .toc > ul > li > ul > li a:before { | ||
content: counter(toc1-counter, arabic-indic) ". "; | ||
} | ||
|
||
:lang(ar) .toc > ul > li > ul > li > ul > li a:before, | ||
:lang(fa) .toc > ul > li > ul > li > ul > li a:before { | ||
content: counter(toc2-counter, arabic-indic) "." counter(toc1-counter, arabic-indic) ". "; | ||
} | ||
|
||
:lang(ar) .toc > ul > li > ul > li > ul > li > ul > li a:before, | ||
:lang(fa) .toc > ul > li > ul > li > ul > li > ul > li a:before { | ||
content: counter(toc3-counter, arabic-indic) "." counter(toc2-counter, arabic-indic) "." counter(toc1-counter, arabic-indic) ". "; | ||
} | ||
|
||
:lang(ar) .toc > ul > li > ul > li > ul > li > ul > li > ul > li a:before, | ||
:lang(fa) .toc > ul > li > ul > li > ul > li > ul > li > ul > li a:before { | ||
content: counter(toc4-counter, arabic-indic) "." counter(toc3-counter, arabic-indic) "." counter(toc2-counter, arabic-indic) "." counter(toc1-counter, arabic-indic) ". "; | ||
} | ||
|
||
:lang(ar) .toc > ul > li > ul > li > ul > li > ul > li > ul > li > ul > li a:before, | ||
:lang(fa) .toc > ul > li > ul > li > ul > li > ul > li > ul > li > ul > li a:before { | ||
content: counter(toc5-counter, arabic-indic) "." counter(toc4-counter, arabic-indic) "." counter(toc3-counter, arabic-indic) "." counter(toc2-counter, arabic-indic) "." counter(toc1-counter, arabic-indic) ". "; | ||
} | ||
|
||
|
||
/* Numbering for headings. */ | ||
|
||
h1 { | ||
counter-reset: h2counter; | ||
} | ||
|
||
h2 { | ||
counter-reset: h3counter; | ||
counter-increment: h2counter; | ||
} | ||
|
||
h3 { | ||
counter-reset: h4counter; | ||
counter-increment: h3counter; | ||
} | ||
|
||
h4 { | ||
counter-reset: h5counter; | ||
counter-increment: h4counter; | ||
} | ||
|
||
h5 { | ||
counter-reset: h6counter; | ||
counter-increment: h5counter; | ||
} | ||
|
||
h6 { | ||
counter-increment: h6counter; | ||
} | ||
|
||
h2:before { | ||
content: counter(h2counter) ". "; | ||
} | ||
|
||
h3:before { | ||
content: counter(h2counter) "." counter(h3counter) ". "; | ||
} | ||
|
||
h4:before { | ||
content: counter(h2counter) "." counter(h3counter) "." counter(h4counter) ". "; | ||
} | ||
|
||
h5:before { | ||
content: counter(h2counter) "." counter(h3counter) "." counter(h4counter) "." counter(h5counter) ". "; | ||
} | ||
|
||
h6:before { | ||
content: counter(h2counter) "." counter(h3counter) "." counter(h4counter) "." counter(h5counter) "." counter(h6counter) ". "; | ||
} | ||
|
||
/* RTL */ | ||
:lang(ar) h2:before, :lang(fa) h2:before { | ||
content: counter(h2counter, arabic-indic) ". "; | ||
} | ||
|
||
:lang(ar) h3:before, :lang(fa) h3:before { | ||
content: counter(h3counter, arabic-indic) "." counter(h2counter, arabic-indic) ". "; | ||
} | ||
|
||
:lang(ar) h4:before, :lang(fa) h4:before { | ||
content: counter(h4counter, arabic-indic) "." counter(h3counter, arabic-indic) "." counter(h2counter, arabic-indic) ". "; | ||
} | ||
|
||
:lang(ar) h5:before, :lang(fa) h5:before { | ||
content: counter(h5counter, arabic-indic) "." counter(h4counter, arabic-indic) "." counter(h3counter, arabic-indic) "." counter(h2counter, arabic-indic) ". "; | ||
} | ||
|
||
:lang(ar) h6:before, :lang(fa) h6:before { | ||
content: counter(h6counter, arabic-indic) "." counter(h5counter, arabic-indic) "." counter(h4counter, arabic-indic) "." counter(h3counter, arabic-indic) "." counter(h2counter, arabic-indic) ". "; | ||
} |