blog/assets/blog.css

345 lines
4.9 KiB
CSS

@import url("monokai.css") screen and (prefers-color-scheme: dark);
@import url("pastie.css") (prefers-color-scheme: light), print;
:root
{
--bg: #1d1f21;
--bg-code: #101;
--bg-code-trans: #1018;
--bg-hover: #282a2e;
--bg-dark: #1b1b1b;
--fg: LightGray;
--fg-dim: Gray;
--link: SkyBlue;
--link-hover: MediumAquamarine;
--link-visited: Plum;
--fg-note: LimeGreen;
--fg-tip: CornflowerBlue;
--fg-important: Gold;
--fg-caution: Orange;
--fg-warning: OrangeRed;
--font-serif: "Source Serif Pro", serif;
--font-sans-serif: "Source Sans Pro", sans-serif;
--font-mono: "Source Code Pro", monospace;
}
@media (prefers-color-scheme: light), print
{
:root
{
--bg: #eee;
--bg-code: #fff; /* From pastie.css */
--bg-code-trans: #fff8;
--bg-hover: #f8f8f8;
--bg-dark: #ddd;
--fg: #1d1f21;
--fg-dim: Gray;
--link: MediumBlue;
--link-hover: ForestGreen;
--link-visited: MediumVioletRed;
--fg-note: ForestGreen;
--fg-tip: DodgerBlue;
--fg-important: Chocolate;
--fg-caution: OrangeRed;
--fg-warning: Red;
}
}
@media print
{
:root
{
--bg: white;
}
}
html
{
background-color: var(--bg);
color: var(--fg);
font-family: var(--font-serif);
text-align: justify;
scroll-padding-top: 0.5em;
}
/* Exception for /posts/, /tags/ and headlines */
.list, .terms, h1, h2, h3, h4, h5, h6
{
text-align: left;
}
body
{
margin-top: 0.5em;
margin-bottom: 0.5em;
}
p
{
text-indent: 0.5em;
margin: 0.5em auto;
}
/* No indent for <b> tags and whatnot. */
p *
{
text-indent: 0;
}
li p
{
text-indent: 0;
}
a
{
color: var(--link);
}
a:visited
{
color: var(--link-visited);
}
a:hover, a:hover:visited
{
color: var(--link-hover);
}
.header, .nav ul, .pagination ul, h1, h2, h3, h4, h5, h6
{
font-family: var(--font-sans-serif);
}
.header .title, .nav a
{
padding: 0.2em 0.4em;
text-decoration: none;
color: var(--fg);
}
.header .title
{
margin-left: -0.4em;
font-family: var(--font-serif);
font-variant: small-caps;
}
.header a:hover, .nav a:hover
{
background-color: var(--bg-hover);
}
.header .description::before
{
content: "";
}
.description
{
font-size: 115%;
float: right;
color: var(--fg-dim);
}
hr
{
color: var(--fg);
}
.nav-top, .nav-bottom
{
text-align: center;
}
/* Needed to position the language menu right. */
.nav ul
{
width: 100%;
}
.language-menu
{
float: right;
bottom: 0;
margin-right: 0 !important;
}
.language-menu a
{
font-size: 100%;
}
code, kbd, pre, samp
{
font-family: var(--font-mono);
}
p > code, td > code
{
background-color: var(--bg-code-trans);
padding: 0.1em;
}
pre
{
padding: 0.2em;
}
div.admonitionblock td.icon
{
border-color: var(--bg-hover);
}
div.admonitionblock table
{
background-color: var(--bg-dark);
/* box-shadow: 0 0 0.1em 0 var(--link-hover); */
}
div.note td.icon
{
color: var(--fg-note);
}
div.note table
{
box-shadow: 0 0 0.1em 0 var(--fg-note);
}
div.tip td.icon
{
color: var(--fg-tip);
}
div.tip table
{
box-shadow: 0 0 0.1em 0 var(--fg-tip);
}
div.important td.icon
{
color: var(--fg-important);
}
div.important table
{
box-shadow: 0 0 0.1em 0 var(--fg-important);
}
div.caution td.icon
{
color: var(--fg-caution);
}
div.caution table
{
box-shadow: 0 0 0.1em 0 var(--fg-caution);
}
div.warning td.icon
{
color: var(--fg-warning);
}
div.warning table
{
box-shadow: 0 0 0.1em 0 var(--fg-warning);
}
/* Overwrite background color for highlighted sections. */
.highlight
{
background-color: var(--bg-code) !important;
}
div, table, code, img
{
border-radius: 0.2em;
}
kbd
{
display: inline-block;
padding: 0.05em;
background-color: var(--fg);
color: var(--bg);
border: 0.15em inset var(--fg-dim);
border-radius: 0.2em;
}
.button
{
display: inline-block;
padding: 0 0.1em;
border: 0.15em outset var(--bg-dark);
border-radius: 0.2em;
}
.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;
}
.toc h2, .toc ul, .toc ol
{
margin: 0 0;
}
.toc h2
{
font-size: 120%;
}
@media screen and (min-width: 80ch)
{
.toc
{
float: right;
margin-left: 1em;
}
}
.pagination
{
margin-top: 0.5em;
font-family: var(--font-sans-serif);
background-color: var(--bg-dark);
padding-left: 0.2em;
border-top: 0.1em dotted var(--bg-hover);
}
.changelog
{
text-align: right;
}
.quoteblock
{
border-color: var(--bg-hover);
}
#footnotes
{
text-align: left;
}
:target
{
outline: 0.01em dotted var(--fg-dim);
}
/* Includes title above code examples */
.listingblock
{
background-color: var(--bg-dark);
}