« Modèle:TOC limit » : différence entre les versions

Xadrow (discussion | contributions)
Aucun résumé des modifications
Xadrow (discussion | contributions)
Aucun résumé des modifications
 
(Une version intermédiaire par le même utilisateur non affichée)
Ligne 1 : Ligne 1 :
<div class="toclimit-{{{1|{{{limit|3}}}}}}">__TOC__</div>
---
Faudrait ajouter le texte suivant au Common.css
/* Allow limiting of which header levels are shown in a TOC;
/* Allow limiting of which header levels are shown in a TOC;
   <div class="toclimit-3">, for instance, will limit to
   <div class="toclimit-3">, for instance, will limit to
   showing ==headings== and ===headings=== but no further
   showing ==headings== and ===headings=== but no further
   (as long as there are no =headings= on the page, which
   (as long as there are no =headings= on the page, which
   there shouldn't be according to the MoS). */
   there shouldn't be according to the MoS).
*/
.toclimit-2 .toclevel-1 ul,
.toclimit-2 .toclevel-1 ul,
.toclimit-3 .toclevel-2 ul,
.toclimit-3 .toclevel-2 ul,
Ligne 10 : Ligne 17 :
.toclimit-6 .toclevel-5 ul,
.toclimit-6 .toclevel-5 ul,
.toclimit-7 .toclevel-6 ul {
.toclimit-7 .toclevel-6 ul {
display: none;
    display: none;
}
 
/* Auto-expand sections (this works in personal common.css file, but does not appear to work here) */
.client-js .vector-toc .vector-toc-level-1 .vector-toc-list-item {
  display: block;
}
 
/* Force TOC numbering, just as an experiment */
.vector-toc .vector-toc-numb {
    display: initial;
    color: black;
    margin-right: 4px;
}
}