Last active
June 21, 2020 08:26
-
-
Save rschiang/95c864059b0d7f3d004ecefa84e488ad to your computer and use it in GitHub Desktop.
Crimson, a Markdown theme for legal reports
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
/* | |
Crimson – a theme for legal reports | |
© RSChiang 2019, CC BY-SA 4.0 | |
*/ | |
/* Metrics */ | |
html, body { | |
margin: 0; | |
padding: 0; | |
font-size: 16px; | |
line-height: 1.75; | |
} | |
@media print { | |
@page { | |
size: letter; | |
margin: 1in 1.25in; | |
} | |
html, body { | |
color: black; | |
font-size: 12pt; | |
} | |
} | |
@media only screen { | |
body { | |
color: #111; | |
margin: 1rem 2rem; | |
} | |
} | |
h1, h2, h3, h4, h5, h6 { | |
margin: 1rem 0; | |
padding: 0; | |
font-size: 1rem; | |
line-height: 1rem; | |
} | |
h1 { | |
font-size: 1.25rem; | |
line-height: 2rem; | |
text-align: center; | |
} | |
p { | |
margin: 1rem 0; | |
} | |
sup, sub { | |
line-height: normal; | |
} | |
hr { | |
height: .25rem; | |
margin: 1rem 0; | |
border: 0 none; | |
} | |
img { | |
max-width: 100%; | |
height: auto; | |
} | |
/* Overrides */ | |
* { | |
box-sizing: border-box; | |
} | |
body > *:first-child, | |
blockquote > *:first-child { | |
margin-top: 0 !important; | |
} | |
body > *:last-child, | |
blockquote > :*:last-child { | |
margin-bottom: 0 !important; | |
} | |
/* Typography */ | |
html, body { | |
font-family: Crimson, Garamond, 'Source Han Serif TC', 'Songti TC', serif; | |
} | |
h1, h2, h3, h4, h5, h6 { | |
font-family: 'Source Serif Pro', Garamond, 'Source Han Serif TC', 'Songti TC', serif; | |
font-weight: bold; | |
} | |
pre { | |
font-family: 'Source Han Mono TC', 'Source Han Sans HW TC', 'Source Code Pro', monospace; | |
} | |
em { | |
font-synthesis: none; | |
} | |
blockquote { | |
margin: 0; | |
padding: 0 1rem; | |
} | |
/* Combined CJK quotation font */ | |
@font-face { | |
font-family: 'Crimson Latin'; | |
font-style: normal; | |
src: local(Crimson-Italic); | |
unicode-range: U+0025-2450; | |
} | |
@font-face { | |
font-family: 'Yu Kana'; | |
font-style: normal; | |
src: local(YuKyo_Yoko-Medium); | |
unicode-range: U+3040-30FF; | |
} | |
/* Colors */ | |
:root { | |
--dark-crimson: #a90533; | |
--light-crimson: #ed174c; | |
--press-black: #292926; | |
--press-white: white; | |
--limestone: #dedad7; | |
--mahogany: #493828; | |
} | |
/* Elements */ | |
a { | |
background: transparent; | |
color: var(--dark-crimson); | |
text-decoration: none; | |
} | |
hr { | |
background: var(--limestone); | |
} | |
/* Tables */ | |
table { | |
width: 100%; | |
} | |
th, tr, td { | |
background-color: transparent; | |
border: 0; | |
} | |
/* TOC */ | |
.toc { | |
padding: 0; | |
list-style: none; | |
} | |
.toc::before { | |
content: "Table of Contents"; | |
display: block; | |
text-align: center; | |
margin: 1rem 0; | |
padding: 0; | |
font-size: 1rem; | |
line-height: 1rem; | |
font-family: 'Source Serif Pro', Garamond, 'Source Han Serif TC', 'Songti TC', serif; | |
font-weight: bold; | |
} | |
.toc ul { | |
padding: 0 0 0 2rem; | |
list-style: none; | |
} | |
.toc > li > a { | |
font-variant: small-caps; | |
} | |
.toc > li > ul > li > a { | |
font-style: italic; | |
} | |
/* Footnotes */ | |
.footnotes { | |
font-size: 13.5px; | |
} | |
.footnotes > ol { | |
padding: 0 0 0 2rem; | |
list-style: none; | |
counter-reset: footnote; | |
} | |
.footnotes > ol > li { | |
position: relative; | |
counter-increment: footnote; | |
} | |
.footnotes > ol > li::before { | |
content: counter(footnote); | |
position: absolute; | |
left: -2rem; | |
width: 1.625rem; | |
text-align: right; | |
font-variant-position: super; | |
} | |
@supports not (font-variant-position: super) { | |
.footnotes > ol > li::before { | |
top: 0.5em; | |
font-size: 75%; | |
font-weight: 500; | |
font-variant-numeric: tabular-nums; | |
line-height: 1; | |
} | |
} | |
.footnotes > ol > li[data-bullet] { | |
counter-increment: none; | |
} | |
.footnotes > ol > li[data-bullet]::before { | |
content: attr(data-bullet); | |
} | |
.footnotes p { | |
margin: 0; | |
} | |
.footnotes a { | |
word-break: break-all; | |
word-wrap: break-word; | |
} | |
.footnotes a[rev] { | |
display: none; | |
} | |
.footnotes em { | |
font-family: Crimson, 'Yu Kana', 'Kaiti TC', serif; | |
} | |
@supports not (font-synthesis: none) { | |
.footnotes em { | |
font-family: 'Crimson Latin', 'Yu Kana', 'Kaiti TC', serif; | |
font-style: normal; | |
} | |
} | |
.footnotes cite { | |
font-style: normal; | |
font-variant: small-caps; | |
} | |
sup a, | |
a[rev=footnote] { | |
text-decoration: none; | |
} | |
@media print { | |
.footnotes { | |
font-size: 10pt; | |
} | |
a[rev=footnote] { | |
display: none; | |
} | |
} | |
/* Editor support */ | |
@media screen { | |
html, body { | |
background: var(--press-white); | |
color: var(--press-black); | |
} | |
} | |
@media screen and (prefers-color-scheme: dark) { | |
html, body { | |
background: var(--press-black); | |
color: var(--limestone); | |
} | |
a { | |
color: var(--light-crimson); | |
} | |
hr { | |
background: var(--mahogany); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment