diff options
Diffstat (limited to 'css')
-rw-r--r-- | css/code.css | 101 | ||||
-rw-r--r-- | css/style.css | 3 |
2 files changed, 103 insertions, 1 deletions
diff --git a/css/code.css b/css/code.css new file mode 100644 index 0000000..b32a3bf --- /dev/null +++ b/css/code.css @@ -0,0 +1,101 @@ +pre > code.sourceCode { + white-space: pre; + position: relative; + font-size: 0.80em; +} +pre > code.sourceCode > span { + line-height: 1.25; +} +pre > code.sourceCode > span:empty { + height: 1.2em; +} +.sourceCode { + overflow: scroll; +} +code.sourceCode > span { + color: inherit; + text-decoration: inherit; +} +div.sourceCode { + margin: 1em 0; +} +pre.sourceCode { + margin: 0; + padding: 10px; + border-radius: 10px; + color: #abb2bf; + background: #282c34; +} +pre.numberSource { + margin-left: 3em; + border-left: 1px solid #aaaaaa; + padding-left: 4px; +} +pre.numberSource code { + counter-reset: source-line 0; +} +pre.numberSource code > span { + position: relative; + left: -4em; + counter-increment: source-line; +} +pre.numberSource code > span > a:first-child::before { + content: counter(source-line); + position: relative; + left: -1em; + text-align: right; + vertical-align: baseline; + border: none; + display: inline-block; + user-select: none; + padding: 0 4px; + width: 4em; + color: #aaaaaa; +} +@media screen { + div.sourceCode { + overflow: auto; + } + pre > code.sourceCode > span > a:first-child::before { + text-decoration: underline; + } +} +@media print { + pre > code.sourceCode { + white-space: pre-wrap; + } + pre > code.sourceCode > span { + display: inline-block; + text-indent: -5em; + padding-left: 5em; + } +} +code span.kw { color: #C678DD; font-weight: bold; } /* Keyword */ +code span.cf { color: #C678DD; font-weight: bold; } /* ControlFlow */ +code span.op { color: #C678DD; } /* Operator */ +code span.ot { color: #C678DD; } /* Other */ +code span.va { color: #E06C75; } /* Variable */ +code span.cn { color: #E06C75; } /* Constant */ +code span.bu { color: #E06C75; } /* BuiltIn */ +code span.im { color: #E06C75; font-weight: bold; } /* Import */ +code span.fl { color: #de935f; } /* Float */ +code span.dv { color: #de935f; } /* DecVal */ +code span.bn { color: #de935f; } /* BaseN */ +code span.dt { color: #56B6C2; } /* DataType */ +code span.at { color: #56B6C2; } /* Attribute */ +code span.an { color: #56B6C2; font-weight: bold; font-style: italic; } /* Annotation */ +code span.fu { color: #61AFEF; } /* Function */ +code span.pp { color: #61AFEF; } /* Preprocessor */ +code span.ch { color: #40a070; } /* Char */ +code span.st { color: #40a070; } /* String */ +code span.vs { color: #40a070; } /* VerbatimString */ +code span.sc { color: #40a070; } /* SpecialChar */ +code span.ss { color: #40a070; } /* SpecialString */ +code span.co { color: #5c6370; font-style: italic; } /* Comment */ +code span.do { color: #5c6370; font-weight: bold; font-style: italic; } /* Documentation */ +code span.cv { color: #5c6370; font-weight: bold; font-style: italic; } /* CommentVar */ +code span.in { color: #5c6370; font-weight: bold; font-style: italic; } /* Information */ +code span.al { color: #ff0000; font-weight: bold; } /* Alert */ +code span.er { color: #ff0000; font-weight: bold; } /* Error */ +code span.wa { color: #ff8000; font-weight: bold; font-style: italic; } /* Warning */ +code span.ex { } /* Extension */ diff --git a/css/style.css b/css/style.css index 3920f27..1e9d011 100644 --- a/css/style.css +++ b/css/style.css @@ -1,5 +1,6 @@ @import url("normalize.css"); @import url("fonts.css"); +@import url("code.css"); body { font-family: Alegreya, serif; @@ -23,7 +24,7 @@ a:hover { code { font-family: NotoSansMono, monospace; - font-size: 18px; + font-size: 0.8em; } header { |