Created
September 16, 2019 16:12
-
-
Save damenleeturks/c2a16dbacefac07a1dc824b12d3a16d5 to your computer and use it in GitHub Desktop.
Help show semantic structure via sectioning. Adds automatic numbers to sections (including nested sections)
This file contains hidden or 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
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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment