blog/assets/blog.css

309 lines
5.0 KiB
CSS
Raw Normal View History

2021-07-20 14:37:19 +02:00
@import url("monokai.css") screen and (prefers-color-scheme: dark);
2021-07-27 12:14:36 +02:00
@import url("pastie.css") (prefers-color-scheme: light), print;
2021-07-20 14:37:19 +02:00
2023-10-14 18:01:19 +02:00
:root {
--bg: #308;
--fg: #e8e;
--accent: #f4c;
--semitrans: #0004;
--link: #4cf;
2019-11-26 23:57:51 +01:00
2021-07-20 14:37:19 +02:00
--fg-note: LimeGreen;
--fg-tip: CornflowerBlue;
--fg-important: Gold;
--fg-caution: Orange;
--fg-warning: OrangeRed;
2023-10-14 18:01:19 +02:00
}
2021-07-20 14:37:19 +02:00
2023-10-14 18:01:19 +02:00
@media (prefers-color-scheme: light), print {
:root {
--bg: #e8e;
--fg: #308;
--accent: #704;
--semitrans: #fff4;
--link: #04f;
2021-07-20 14:37:19 +02:00
2021-07-27 12:14:36 +02:00
--fg-note: ForestGreen;
--fg-tip: DodgerBlue;
2021-07-20 14:37:19 +02:00
--fg-important: Chocolate;
--fg-caution: OrangeRed;
2021-07-20 14:37:19 +02:00
--fg-warning: Red;
}
}
2023-10-14 18:01:19 +02:00
@media print {
:root {
2021-07-27 12:14:36 +02:00
--bg: white;
2023-10-14 18:01:19 +02:00
--fg: black;
2021-07-27 12:14:36 +02:00
}
}
:root {
--bg-alt: color-mix(in srgb, var(--bg) 70%, var(--semitrans));
--fg-alt: color-mix(in srgb, var(--fg) 70%, var(--semitrans));
--link-alt: color-mix(in srgb, var(--link) 50%, var(--fg));
}
2023-10-14 18:01:19 +02:00
html {
2019-11-26 23:57:51 +01:00
background-color: var(--bg);
color: var(--fg);
2023-10-14 18:01:19 +02:00
font-family: serif;
2021-07-10 14:54:13 +02:00
text-align: justify;
2021-07-20 15:58:12 +02:00
scroll-padding-top: 0.5em;
2023-10-14 18:01:19 +02:00
scrollbar-color: var(--accent) var(--semitrans);
2019-11-26 23:57:51 +01:00
}
2021-08-09 17:17:38 +02:00
/* Exception for /posts/, /tags/ and headlines */
2023-10-14 18:01:19 +02:00
.list, .terms, h1, h2, h3, h4, h5, h6 {
text-align: left;
}
2023-10-14 18:01:19 +02:00
body {
2019-11-26 23:57:51 +01:00
margin-top: 0.5em;
margin-bottom: 0.5em;
}
2023-10-14 18:01:19 +02:00
p {
text-indent: 0.5em;
margin: 0.5em auto;
}
2022-04-18 18:48:15 +02:00
.content > div:first-of-type > p:first-of-type,
2023-10-14 18:01:19 +02:00
.sectionbody > div:first-of-type > p:first-of-type {
2022-03-21 21:50:08 +01:00
text-indent: 0;
}
2021-07-11 22:47:20 +02:00
/* No indent for <b> tags and whatnot. */
2023-10-14 18:01:19 +02:00
p * {
2021-07-11 22:47:20 +02:00
text-indent: 0;
}
2023-10-14 18:01:19 +02:00
li p, dd p {
text-indent: 0;
}
2023-10-14 18:01:19 +02:00
a {
2019-11-26 23:57:51 +01:00
color: var(--link);
}
2023-10-14 18:01:19 +02:00
a:visited {
color: var(--link-alt);
2023-10-14 18:01:19 +02:00
}
a:hover, a:hover:visited {
color: var(--accent);
}
a:active {
background-color: var(--semitrans);
border-radius: 0.2em;
2019-11-26 23:57:51 +01:00
}
2023-10-14 18:01:19 +02:00
.header, .nav ul, .pagination ul, h1, h2, h3, h4, h5, h6 {
font-family: sans-serif;
2019-11-26 23:57:51 +01:00
}
2023-10-14 18:01:19 +02:00
h1, h2, h3, h4, h5, h6 {
text-shadow: -1px -2px 4px var(--accent);
2019-11-26 23:57:51 +01:00
}
2023-10-14 18:01:19 +02:00
.header .title, .nav a {
2019-11-26 23:57:51 +01:00
padding: 0.2em 0.4em;
text-decoration: none;
color: var(--fg);
}
2023-10-14 18:01:19 +02:00
.header .title {
2021-07-16 23:00:30 +02:00
margin-left: -0.4em;
2023-10-14 18:01:19 +02:00
font-family: serif;
font-variant: small-caps;
2023-10-14 18:01:19 +02:00
text-shadow: 0 0 8px var(--accent);
2019-11-26 23:57:51 +01:00
}
2023-10-14 18:01:19 +02:00
.header a:hover, .nav a:hover {
background-color: var(--semitrans);
2019-11-26 23:57:51 +01:00
}
2023-10-14 18:01:19 +02:00
.nav a {
text-shadow: 1px 2px 4px var(--accent);
}
.header .description::before {
2019-11-26 23:57:51 +01:00
content: "";
}
2023-10-14 18:01:19 +02:00
.description {
2021-07-16 22:52:40 +02:00
font-size: 115%;
2019-11-26 23:57:51 +01:00
float: right;
2023-10-14 18:01:19 +02:00
filter: hue-rotate(-30deg);
2019-11-26 23:57:51 +01:00
}
2023-10-14 18:01:19 +02:00
hr {
color: var(--fg);
2019-11-26 23:57:51 +01:00
}
2023-10-14 18:01:19 +02:00
.nav-top, .nav-bottom {
2019-11-26 23:57:51 +01:00
text-align: center;
}
2021-07-11 22:15:15 +02:00
/* Needed to position the language menu right. */
2023-10-14 18:01:19 +02:00
.nav ul {
2021-07-11 22:15:15 +02:00
width: 100%;
}
2023-10-14 18:01:19 +02:00
.language-menu {
2021-07-11 22:15:15 +02:00
float: right;
bottom: 0;
margin-right: 0 !important;
}
2023-10-14 18:01:19 +02:00
.language-menu a {
2021-07-11 22:15:15 +02:00
font-size: 100%;
}
2023-10-14 18:01:19 +02:00
code, kbd, pre, samp {
font-family: monospace;
2019-11-26 23:57:51 +01:00
}
2023-10-14 18:01:19 +02:00
p > code, td > code {
background-color: var(--semitrans);
text-shadow: 0 0 2px var(--accent);
2019-12-04 20:01:30 +01:00
padding: 0.1em;
2019-11-26 23:57:51 +01:00
}
2023-10-14 18:01:19 +02:00
pre {
2019-12-04 20:29:31 +01:00
padding: 0.2em;
2019-12-04 20:10:03 +01:00
}
2023-10-14 18:01:19 +02:00
div.admonitionblock td.icon {
border-color: var(--semitrans);
2019-11-26 23:57:51 +01:00
}
2023-10-14 18:01:19 +02:00
div.admonitionblock table {
background-color: var(--bg-alt);
2019-11-26 23:57:51 +01:00
}
2023-10-14 18:01:19 +02:00
div.note td.icon {
2021-07-20 14:37:19 +02:00
color: var(--fg-note);
2019-11-26 23:57:51 +01:00
}
2023-10-14 18:01:19 +02:00
div.note table {
2021-07-20 14:37:19 +02:00
box-shadow: 0 0 0.1em 0 var(--fg-note);
}
2023-10-14 18:01:19 +02:00
div.tip td.icon {
2021-07-20 14:37:19 +02:00
color: var(--fg-tip);
2019-11-26 23:57:51 +01:00
}
2023-10-14 18:01:19 +02:00
div.tip table {
2021-07-20 14:37:19 +02:00
box-shadow: 0 0 0.1em 0 var(--fg-tip);
}
2023-10-14 18:01:19 +02:00
div.important td.icon {
2021-07-20 14:37:19 +02:00
color: var(--fg-important);
2019-11-26 23:57:51 +01:00
}
2023-10-14 18:01:19 +02:00
div.important table {
2021-07-20 14:37:19 +02:00
box-shadow: 0 0 0.1em 0 var(--fg-important);
}
2023-10-14 18:01:19 +02:00
div.caution td.icon {
2021-07-20 14:37:19 +02:00
color: var(--fg-caution);
2019-11-26 23:57:51 +01:00
}
2023-10-14 18:01:19 +02:00
div.caution table {
2021-07-20 14:37:19 +02:00
box-shadow: 0 0 0.1em 0 var(--fg-caution);
}
2023-10-14 18:01:19 +02:00
div.warning td.icon {
2021-07-20 14:37:19 +02:00
color: var(--fg-warning);
2019-11-26 23:57:51 +01:00
}
2023-10-14 18:01:19 +02:00
div.warning table {
2021-07-20 14:37:19 +02:00
box-shadow: 0 0 0.1em 0 var(--fg-warning);
}
/* Overwrite background color for highlighted sections. */
2023-10-14 18:01:19 +02:00
.highlight {
background-color: var(--semitrans) !important;
}
2019-12-04 20:01:30 +01:00
2023-10-14 18:01:19 +02:00
div, table, code, img {
2019-12-04 20:01:30 +01:00
border-radius: 0.2em;
}
2021-03-15 10:54:04 +01:00
2023-10-14 18:01:19 +02:00
kbd {
display: inline-block;
2021-03-16 00:46:40 +01:00
padding: 0.05em;
2021-03-15 10:54:04 +01:00
background-color: var(--fg);
color: var(--bg);
border: 0.15em inset var(--fg-alt);
2021-03-15 10:54:04 +01:00
border-radius: 0.2em;
}
2023-10-14 18:01:19 +02:00
.button {
display: inline-block;
2021-03-15 17:55:37 +01:00
padding: 0 0.1em;
border: 0.15em outset var(--bg-alt);
border-radius: 0.2em;
2021-03-15 17:55:37 +01:00
}
2023-10-14 18:01:19 +02:00
.toc {
margin-top: 0.2em;
margin-bottom: 0.2em;
padding: 0 0.2em;
max-width: 40ch;
box-shadow: 0 0 0.1em;
border-radius: 0.1em;
}
2023-10-14 18:01:19 +02:00
.toc h2, .toc ul, .toc ol {
margin: 0 0;
}
2023-10-14 18:01:19 +02:00
.toc h2 {
font-size: 120%;
}
2021-03-15 17:36:34 +01:00
2023-10-14 18:01:19 +02:00
@media screen and (min-width: 80ch) {
.toc {
float: right;
margin-left: 1em;
}
}
2023-10-14 18:01:19 +02:00
.pagination {
2021-03-15 17:36:34 +01:00
margin-top: 0.5em;
2023-10-14 18:01:19 +02:00
font-family: sans-serif;
background-color: var(--bg-alt);
2021-03-15 17:36:34 +01:00
padding-left: 0.2em;
2023-10-14 18:01:19 +02:00
border-top: 0.1em dotted var(--accent);
2021-03-15 17:36:34 +01:00
}
2021-03-30 02:25:18 +02:00
2023-10-14 18:01:19 +02:00
.changelog {
2021-03-30 02:25:18 +02:00
text-align: right;
}
2021-07-17 16:41:21 +02:00
2023-10-14 18:01:19 +02:00
.quoteblock {
border-color: var(--semitrans);
2021-07-17 16:41:21 +02:00
}
2023-10-14 18:01:19 +02:00
#footnotes {
2021-07-17 16:41:21 +02:00
text-align: left;
}
2021-07-20 15:58:12 +02:00
2023-10-14 18:01:19 +02:00
:target {
outline: 0.01em dotted var(--accent);
2021-07-20 15:58:12 +02:00
}
/* Includes title above code examples */
2023-10-14 18:01:19 +02:00
.listingblock {
background-color: var(--semitrans);
}
2022-09-26 17:50:03 +02:00
.listingblock .title {
font-style: italic;
}