mkht.php/style.css
2024-09-21 23:20:32 +02:00

320 lines
7.3 KiB
CSS

:root {
--dark-color: #141312;
--light-color: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
:root {
--foreground-color: var(--light-color);
--background-color: var(--dark-color);
--main-color: #FF1E00;
}
}
@media (prefers-color-scheme: light) {
:root {
--foreground-color: var(--dark-color);
--background-color: var(--light-color);
--main-color: #FF0000;
}
}
::selection {
color: var(--background-color);
background-color: var(--foreground-color);
}
* {
scrollbar-color: var(--foreground-color) var(--background-color);
}
body {
font-family: system-ui, sans-serif;
font-size: 1rem;
line-height: 1.5em;
margin: 1rem;
margin-top: 0;
padding: 0;
background-color: var(--background-color);
color: var(--foreground-color);
}
main {
max-width: 40rem;
margin-left: auto;
margin-right: auto;
}
a, a:visited, a[title], a[title]:visited {
text-decoration: solid underline;
transition-property: color, border-color;
transition-duration: 0.05s;
transition-timing-function: linear;
background-color: var(--background-color);
color: var(--foreground-color);
}
a:hover, a:visited:hover, a:focus, a:focus:visited {
text-decoration: none;
color: var(--main-color);
}
.small-button, .button {
border-width: 0.125rem;
border-style: solid;
padding: 0.5rem 1rem 0.5rem 1rem;
margin: 0.4rem;
display: inline-block;
border-radius: 0.8rem;
text-decoration: none;
border-color: var(--foreground-color);
}
.small-button:hover, .button:hover, .small-button:focus, .button:focus {
color: var(--main-color);
border-color: var(--main-color);
}
.small-button {
font-size: 80%;
padding: 0 1rem 0 1rem;
}
img {
height: auto;
max-width: 100%;
}
.imgArticle {
display: block;
margin: auto;
margin-top: 20px;
margin-bottom: 20px;
}
strong {
font-weight: bold;
}
pre, code, var, samp {
font-family: monospace;
overflow: auto;
font-style: normal;
word-break: break-all;
white-space: pre;
}
address {
font-style: normal;
}
ul {
padding-left: 1.5rem;
}
ol {
padding-left: 2rem;
}
dl {
margin: 0;
}
dt {
padding-top: 0.8rem;
font-size: 1.2rem;
}
dd {
margin-left: 0.6rem;
padding-left: 1.2rem;
position: relative;
}
dd::before {
content: '↳';
top: 0;
left: 0;
position: absolute;
}
blockquote {
position: relative;
margin: 0;
padding-left: 1.5rem;
padding-right: 1.5rem;
font-style: italic;
}
blockquote::before, blockquote::after {
position: absolute;
font-size: 1.3rem;
}
blockquote::before {
content: '«';
top: 0;
left: 0;
}
blockquote::after {
content: '»';
bottom: 0;
right: 0;
}
p {
margin: 0;
margin-top: 0.5rem;
margin-bottom: 0.5rem;
}
aside {
text-align: center;
}
aside ul {
display: inline-block;
margin: 0;
padding: 0.3rem;
padding-top: 0;
border-bottom: 0.06rem solid var(--foreground-color);
border-left: 0.06rem solid var(--foreground-color);
border-right: 0.06rem solid var(--foreground-color);
border-bottom-right-radius: 1rem;
border-bottom-left-radius: 1rem;
}
aside li {
display: inline;
padding-left: 0.5rem;
padding-right: 0.5rem;
}
header, footer, .centered {
text-align: center;
justify-content: center;
}
[title] {
text-decoration: dotted underline;
}
main [hreflang=en]::after {
content: ' (en)';
}
main [hreflang=fr]::after {
content: ' (fr)';
}
main [hreflang]::after {
font-size: 0.8rem;
}
:target {
border: 0.16rem solid var(--foreground-color);
}
section:not(main > section), pre {
border-left: 0.16rem solid var(--foreground-color);
padding-left: 1rem;
}
pre {
border-left-style: dashed;
}
/* Headings */
h1, h2, h3, h4, h5, h6 {
font-weight: normal;
line-height: 100%;
margin-top: var(--heading-size);
margin-bottom: 0.5rem;
font-size: var(--heading-size);
}
h1 {
--heading-size: 2.6rem;
text-align: center;
}
h2 {
--heading-size: 2.2rem;
}
h3 {
--heading-size: 1.6rem;
}
h4 {
--heading-size: 1.5rem;
}
h5 {
--heading-size: 1.4rem;
}
h6 {
--heading-size: 1.3rem;
}
/* Syntax highlighting */
/* pandoc's "breezedark" style */
@media (prefers-color-scheme: dark) {
code span { color: #cfcfc2; } /* Normal */
code span.al { color: #95da4c; background-color: #4d1f24; font-weight: bold; } /* Alert */
code span.an { color: #3f8058; } /* Annotation */
code span.at { color: #2980b9; } /* Attribute */
code span.bn { color: #f67400; } /* BaseN */
code span.bu { color: #7f8c8d; } /* BuiltIn */
code span.cf { color: #fdbc4b; font-weight: bold; } /* ControlFlow */
code span.ch { color: #3daee9; } /* Char */
code span.cn { color: #27aeae; font-weight: bold; } /* Constant */
code span.co { color: #7a7c7d; } /* Comment */
code span.cv { color: #7f8c8d; } /* CommentVar */
code span.do { color: #a43340; } /* Documentation */
code span.dt { color: #2980b9; } /* DataType */
code span.dv { color: #f67400; } /* DecVal */
code span.er { color: #da4453; text-decoration: underline; } /* Error */
code span.ex { color: #0099ff; font-weight: bold; } /* Extension */
code span.fl { color: #f67400; } /* Float */
code span.fu { color: #8e44ad; } /* Function */
code span.im { color: #27ae60; } /* Import */
code span.in { color: #c45b00; } /* Information */
code span.kw { color: #cfcfc2; font-weight: bold; } /* Keyword */
code span.op { color: #cfcfc2; } /* Operator */
code span.ot { color: #27ae60; } /* Other */
code span.pp { color: #27ae60; } /* Preprocessor */
code span.re { color: #2980b9; background-color: #153042; } /* RegionMarker */
code span.sc { color: #3daee9; } /* SpecialChar */
code span.ss { color: #da4453; } /* SpecialString */
code span.st { color: #f44f4f; } /* String */
code span.va { color: #27aeae; } /* Variable */
code span.vs { color: #da4453; } /* VerbatimString */
code span.wa { color: #da4453; } /* Warning */
}
/* pandoc's "kate" style */
@media (prefers-color-scheme: light) {
code span { color: #1f1c1b; } /* Normal */
code span.al { color: #bf0303; background-color: #f7e6e6; font-weight: bold; } /* Alert */
code span.an { color: #ca60ca; } /* Annotation */
code span.at { color: #0057ae; } /* Attribute */
code span.bn { color: #b08000; } /* BaseN */
code span.bu { color: #644a9b; font-weight: bold; } /* BuiltIn */
code span.cf { color: #1f1c1b; font-weight: bold; } /* ControlFlow */
code span.ch { color: #924c9d; } /* Char */
code span.cn { color: #aa5500; } /* Constant */
code span.co { color: #898887; } /* Comment */
code span.cv { color: #0095ff; } /* CommentVar */
code span.do { color: #607880; } /* Documentation */
code span.dt { color: #0057ae; } /* DataType */
code span.dv { color: #b08000; } /* DecVal */
code span.er { color: #bf0303; text-decoration: underline; } /* Error */
code span.ex { color: #0095ff; font-weight: bold; } /* Extension */
code span.fl { color: #b08000; } /* Float */
code span.fu { color: #644a9b; } /* Function */
code span.im { color: #ff5500; } /* Import */
code span.in { color: #b08000; } /* Information */
code span.kw { color: #1f1c1b; font-weight: bold; } /* Keyword */
code span.op { color: #1f1c1b; } /* Operator */
code span.ot { color: #006e28; } /* Other */
code span.pp { color: #006e28; } /* Preprocessor */
code span.re { color: #0057ae; background-color: #e0e9f8; } /* RegionMarker */
code span.sc { color: #3daee9; } /* SpecialChar */
code span.ss { color: #ff5500; } /* SpecialString */
code span.st { color: #bf0303; } /* String */
code span.va { color: #0057ae; } /* Variable */
code span.vs { color: #bf0303; } /* VerbatimString */
code span.wa { color: #bf0303; } /* Warning */
}