Skip to content

Instantly share code, notes, and snippets.

@damenleeturks
Created September 16, 2019 16:12

Revisions

  1. damenleeturks created this gist Sep 16, 2019.
    57 changes: 57 additions & 0 deletions sectioning.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,57 @@
    section,
    aside {
    padding: 1em;
    border: 1px solid black;
    margin: 1em;
    }

    aside {
    background-color: rgba(100, 100, 100, 0.2);
    }

    section.procedure {
    background-color: #eee;
    }

    body {
    counter-reset: section;
    }

    h1 {
    counter-reset: subsection;
    }

    h2 {
    counter-reset: subsubsection;
    }

    h1::before {
    counter-increment: section;
    content: counter(section) ". ";
    }

    h2::before {
    counter-increment: subsection;
    content: counter(section) "."counter(subsection) " ";
    }

    h3::before {
    counter-increment: subsubsection;
    content: counter(section) "."counter(subsection) "."counter(subsubsection) " ";
    }

    .ref {
    color: red;
    }

    .sectionTitle,
    .asideTitle,
    .listTitle {
    color: blue;
    font-weight: bold;
    }

    header,
    .manualNumbering {
    display: none;
    }