Skip to content

github-markdown-section-numbering by kyokuheki

Details

Authorkyokuheki

LicenseNo License

Categorygithub

Created

Updated

Size1.7 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

github markdown section numbering

Notes

Userstyle doesn't have notes.

Source code

/* ==UserStyle==
@name         github-markdown-section-numbering
@version      20240412.13.40
@namespace    https://userstyles.world/user/kyokuheki
@description  github markdown section numbering
@author       kyokuheki
==/UserStyle== */

@-moz-document url-prefix("https://github.com/") {
article.markdown-body {
    counter-reset: h2c h3c h4c h5c h6c;
}

article.markdown-body h1.heading-element {
    counter-set: h2c;
}

article.markdown-body h2.heading-element {
    counter-set: h3c;
    counter-increment: h2c;
}

article.markdown-body h3.heading-element {
    counter-set: h4c;
    counter-increment: h3c;
}

article.markdown-body h4.heading-element {
    counter-set: h5c;
    counter-increment: h4c;
}

article.markdown-body h5.heading-element {
    counter-set: h6c;
    counter-increment: h5c;
}

article.markdown-body h6.heading-element {
    counter-increment: h6c;
}

article.markdown-body h2.heading-element:before {
    content: "[" counter(h2c) "]" "\00a0\00a0\00a0\00a0";
    white-space: pre;
}

article.markdown-body h3.heading-element:before {
    content: "[" counter(h2c) "." counter(h3c) "]" "\00a0\00a0\00a0\00a0";
    white-space: pre;
}

article.markdown-body h4.heading-element:before {
    content: "[" counter(h2c) "." counter(h3c) "." counter(h4c) "]" "\00a0\00a0\00a0\00a0";
    white-space: pre;
}

article.markdown-body h5.heading-element:before {
    content: "[" counter(h2c) "." counter(h3c) "." counter(h4c) "." counter(h5c) "]" "\00a0\00a0\00a0\00a0";
    white-space: pre;
}

article.markdown-body h6.heading-element:before {
    content: "[" counter(h2c) "." counter(h3c) "." counter(h4c) "." counter(h5c) "." counter(h6c) "]" "\00a0\00a0\00a0\00a0";
    white-space: pre;
}
}

Reviews

No reviews yet.