mylloon.fr/static/css/blog/post.css

179 lines
3 KiB
CSS
Raw Normal View History

2023-04-19 18:55:03 +02:00
@media (prefers-color-scheme: light) {
:root {
--selection: rgba(92, 54, 131, 0.7);
2023-04-24 20:59:02 +02:00
--bg: #ffffff;
--font-color: #18181b;
2023-04-24 23:01:44 +02:00
--code-font-color: #333333;
--code-bg-color: #eeeeee;
2023-04-25 02:32:32 +02:00
--quote-border-color: #9852fa;
--quote-bg-color: #d8d6d6;
2023-04-25 02:45:42 +02:00
--link-hover-color: #fd62af;
2023-04-19 18:55:03 +02:00
}
}
@media (prefers-color-scheme: dark) {
:root {
--selection: rgba(124, 75, 173, 0.5);
2023-04-24 20:59:02 +02:00
--bg: #171e26;
--font-color: #a1a1aa;
2023-04-24 23:01:44 +02:00
--code-font-color: #eeeeee;
--code-bg-color: #333333;
2023-04-25 02:32:32 +02:00
--quote-border-color: #bd93f9;
--quote-bg-color: #273341;
2023-04-25 02:45:42 +02:00
--link-hover-color: #ff80bf;
2023-04-19 18:55:03 +02:00
}
}
:root {
--font-size: 17px;
}
html {
2023-04-24 18:09:14 +02:00
font-family: "Segoe UI", Arial, sans-serif, "Segoe UI Emoji",
"Segoe UI Symbol";
2023-04-19 18:55:03 +02:00
font-size: var(--font-size);
2023-04-24 18:09:14 +02:00
scroll-behavior: smooth;
2023-04-24 20:59:02 +02:00
background-color: var(--bg);
2023-04-19 18:55:03 +02:00
}
::selection {
color: rgb(255, 255, 255);
background: var(--selection);
}
2023-04-24 20:59:02 +02:00
2023-04-25 02:32:32 +02:00
* {
color: var(--font-color);
}
p {
color: var(--font-color);
font-size: var(--font-size);
}
2023-04-24 20:59:02 +02:00
/* Anchors */
h1:hover > a::before,
h2:hover > a::before,
h3:hover > a::before,
h4:hover > a::before,
h5:hover > a::before,
h6:hover > a::before {
visibility: visible;
2023-04-25 02:45:42 +02:00
color: var(--font-color);
2023-04-24 20:59:02 +02:00
}
h1 > a::before,
h2 > a::before,
h3 > a::before,
h4 > a::before,
h5 > a::before,
h6 > a::before {
content: "#";
visibility: hidden;
padding-right: 0.1em;
}
h1 > a,
h2 > a,
h3 > a,
h4 > a,
h5 > a,
h6 > a {
text-decoration: none;
}
body {
margin: 0 auto;
max-width: 720px;
}
footer {
text-align: center;
}
2023-04-25 02:45:42 +02:00
footer > * {
text-transform: uppercase;
font-weight: bold;
font-size: calc(var(--font-size) / 1.2);
letter-spacing: 0.15rem;
opacity: 0.6;
text-decoration: none;
}
a:hover {
color: var(--link-hover-color);
}
2023-04-25 02:32:32 +02:00
/* Marge for numbers */
2023-04-24 20:59:02 +02:00
.hljs {
margin-inline: 0.4em;
}
2023-04-25 02:32:32 +02:00
/* Numbers in codeblocks */
2023-04-24 20:59:02 +02:00
.hljs-ln-numbers {
text-align: right;
}
.hljs-ln
> tbody
2023-04-25 02:32:32 +02:00
> tr:last-child:has(td:last-child > span::-moz-only-whitespace) {
2023-04-24 20:59:02 +02:00
visibility: collapse;
}
/* Temporary fix for layout.css.has-selector.enabled available only on
* Firefox under certain circumstances */
.hljs-ln > tbody > tr:last-child {
visibility: collapse;
}
2023-04-25 02:32:32 +02:00
/* Little snippet of code (not blocks) */
2023-04-24 20:59:02 +02:00
kbd,
2023-04-25 02:32:32 +02:00
code:not(:has(:not(pre))) {
2023-04-24 23:01:44 +02:00
background-color: var(--code-bg-color);
border-radius: 3px;
color: var(--code-font-color);
box-shadow: 0 1px 1px #000000;
display: inline-block;
font-size: 0.85em;
font-weight: 700;
line-height: 1;
padding: 2px 4px;
vertical-align: 1.5px;
}
2023-04-25 02:32:32 +02:00
/* Footnotes */
2023-04-24 23:01:44 +02:00
.footnotes a {
font-family: "Segoe UI";
text-decoration: underline dotted;
}
2023-04-25 02:32:32 +02:00
/* Reference to footnotes */
2023-04-24 23:01:44 +02:00
.footnote-ref > a {
text-decoration: underline dotted;
}
hr {
border: 0;
height: 1px;
background: #8080802f;
}
2023-04-25 02:32:32 +02:00
/* Quotes */
blockquote {
margin: 1em 0;
padding: 0.1em 10px;
border-left: 6px solid;
border-color: var(--quote-border-color);
background-color: var(--quote-bg-color);
}
/* Mermaid diagrams */
pre:has(code.language-mermaid) {
text-align: center;
}
/* Images */
img {
display: block;
margin: auto;
}