/* Global section numbering for rendered docs pages. */

#documenter-page {
  counter-reset: section;
}

#documenter-page > h2 {
  counter-increment: section;
  counter-reset: subsection;
}

#documenter-page > h3 {
  counter-increment: subsection;
  counter-reset: subsubsection;
}

#documenter-page > h4 {
  counter-increment: subsubsection;
  counter-reset: h5counter;
}

#documenter-page > h5 {
  counter-increment: h5counter;
}

#documenter-page > h2 > .docs-heading-anchor::before {
  content: counter(section) ". ";
  color: inherit;
}

#documenter-page > h3 > .docs-heading-anchor::before {
  content: counter(section) "." counter(subsection) " ";
  color: inherit;
}

#documenter-page > h4 > .docs-heading-anchor::before {
  content: counter(section) "." counter(subsection) "." counter(subsubsection) " ";
  color: inherit;
}

#documenter-page > h5 > .docs-heading-anchor::before {
  content: counter(section) "." counter(subsection) "." counter(subsubsection) "." counter(h5counter) " ";
  color: inherit;
}

/* Number the current-page section list in the sidebar as well. */
.docs-menu > li.is-active > ul.internal {
  counter-reset: sidebar-section;
}

.docs-menu > li.is-active > ul.internal > li {
  counter-increment: sidebar-section;
}

.docs-menu > li.is-active > ul.internal > li > a > span::before {
  content: counter(sidebar-section) ". ";
}
