Files
pelican-latex/static/css/site.css
T
haemka 9d85c9556d Fix social-links margins being zeroed by the global ul[class] reset
The reset rule (body, h1, ..., ul[class], ol[class], ..., dd { margin:
0 }) matches via ul[class] at specificity (0,0,1,1), which beats plain
class selectors like .social-links/.social-links--large (0,0,1,0)
regardless of source order - so the margin-top values set for both the
sidebar gap and the About-me divider-to-icon gap were silently always
overridden back to 0. Prefixing both selectors with the ul type
selector ties the specificity, letting these (later in the file) win.
2026-08-13 17:38:49 +00:00

928 lines
17 KiB
CSS

@import url("pygments.css");
@import url("pygments-dark.css") (prefers-color-theme: dark);
@font-face {
font-family: 'Latin Modern';
font-style: normal;
font-weight: normal;
font-display: swap;
src: url('../fonts/LM-regular.woff2') format('woff2'),
url('../fonts/LM-regular.woff') format('woff'),
url('../fonts/LM-regular.ttf') format('truetype');
}
@font-face {
font-family: 'Latin Modern';
font-style: italic;
font-weight: normal;
font-display: swap;
src: url('../fonts/LM-italic.woff2') format('woff2'),
url('../fonts/LM-italic.woff') format('woff'),
url('../fonts/LM-italic.ttf') format('truetype');
}
@font-face {
font-family: 'Latin Modern';
font-style: normal;
font-weight: bold;
font-display: swap;
src: url('../fonts/LM-bold.woff2') format('woff2'),
url('../fonts/LM-bold.woff') format('woff'),
url('../fonts/LM-bold.ttf') format('truetype');
}
@font-face {
font-family: 'Latin Modern';
font-style: italic;
font-weight: bold;
font-display: swap;
src: url('../fonts/LM-bold-italic.woff2') format('woff2'),
url('../fonts/LM-bold-italic.woff') format('woff'),
url('../fonts/LM-bold-italic.ttf') format('truetype');
}
:root {
--main-bg-color: hsl(210, 20%, 98%);
--main-text-color: hsl(0, 5%, 10%);
--main-link-color: hsl(220, 90%, 45%);
--accent-default: hsl(220, 90%, 45%);
--accent-alt: hsl(140, 45%, 28%);
--table-border-color: hsl(0, 0%, 85%);
--table-head-border-color: hsl(0, 0%, 70%);
--main-font: 'Latin Modern', Georgia, Cambria, 'Times New Roman', Times, serif;
}
html[data-font="sans"] {
--main-font: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme]) {
--main-bg-color: hsl(0, 5%, 10%);
--main-text-color: hsl(210, 20%, 98%);
--main-link-color: hsl(0, 100%, 65%);
--accent-default: hsl(0, 100%, 65%);
--accent-alt: hsl(55, 100%, 60%);
--table-border-color: hsl(0, 0%, 15%);
--table-head-border-color: hsl(0, 0%, 30%);
}
}
:root[data-theme="dark"] {
--main-bg-color: hsl(0, 5%, 10%);
--main-text-color: hsl(210, 20%, 98%);
--main-link-color: hsl(0, 100%, 65%);
--accent-default: hsl(0, 100%, 65%);
--accent-alt: hsl(55, 100%, 60%);
--table-border-color: hsl(0, 0%, 15%);
--table-head-border-color: hsl(0, 0%, 30%);
}
:root[data-theme="light"] {
--main-bg-color: hsl(210, 20%, 98%);
--main-text-color: hsl(0, 5%, 10%);
--main-link-color: hsl(220, 90%, 45%);
--accent-default: hsl(220, 90%, 45%);
--accent-alt: hsl(140, 45%, 28%);
--table-border-color: hsl(0, 0%, 85%);
--table-head-border-color: hsl(0, 0%, 70%);
}
/* Accent-Alt-Override */
:root[data-accent="alt"]:not([data-theme="dark"]) {
--main-link-color: hsl(140, 45%, 28%);
--main-bg-color: hsl(35, 30%, 92%);
}
@media (prefers-color-scheme: dark) {
:root[data-accent="alt"]:not([data-theme]) {
--main-link-color: hsl(55, 100%, 60%);
--main-bg-color: hsl(260, 15%, 8%);
}
}
:root[data-theme="dark"][data-accent="alt"] {
--main-link-color: hsl(55, 100%, 60%);
--main-bg-color: hsl(260, 15%, 8%);
}
*, *::before, *::after {
box-sizing: border-box;
}
body, h1, h2, h3, h4, p, ul[class], ol[class], li, figure, figcaption, dl, dd {
margin: 0;
}
html, body {
height: 98%;
max-width: 1280px;
margin: auto;
}
html {
font-size: 1rem;
scroll-behavior: smooth;
}
body {
display: flex;
flex-flow: column nowrap;
font-family: 'Latin Modern', Georgia, Cambria, 'Times New Roman', Times, serif;
line-height: 1.8;
min-height: 100vh;
overflow-x: hidden;
margin: 0 auto;
padding: 2rem 1.25rem;
color: var(--main-text-color);
background-color: var(--main-bg-color);
text-rendering: optimizeLegibility;
font-family: var(--main-font);
}
header {
position: relative;
}
.header-controls {
position: absolute;
top: 0;
right: 0;
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0;
margin: -1.75rem -0.5rem 0 0;
}
.header-delimiter {
color: var(--table-border-color);
font-size: 1rem;
line-height: 1;
user-select: none;
}
.lang-switcher {
position: static;
list-style: none;
display: flex;
gap: 0.5rem;
margin: 0;
padding: 0;
}
p {
text-align: justify;
hyphens: auto;
margin-top: 1rem;
}
a:not([class]) {
text-decoration-skip-ink: auto;
}
a, a:visited {
color: var(--main-link-color);
text-decoration: none;
}
a:focus {
outline-offset: 2px;
outline: 2px solid hsl(220, 90%, 52%);
}
a:hover,
a:focus-visible {
text-decoration: underline;
}
h1 {
font-size: 2.5rem;
line-height: 3.25rem;
margin-bottom: 1.625rem;
}
h2 {
font-size: 1.7rem;
line-height: 2rem;
margin-top: 3rem;
}
h3 {
font-size: 1.4rem;
margin-top: 2.5rem;
}
h4 {
font-size: 1.2rem;
margin-top: 2rem;
}
h5 {
font-size: 1rem;
margin-top: 1.8rem;
}
h6 {
font-size: 1rem;
font-style: italic;
font-weight: normal;
margin-top: 2.5rem;
}
h3, h4, h5, h6 {
line-height: 1.625rem;
}
h1 + h2 {
margin-top: 1.625rem;
}
h2 + h3, h3 + h4, h4 + h5 {
margin-top: 0.8rem;
}
h5 + h6 {
margin-top: -0.8rem;
}
h2, h3, h4, h5, h6 {
margin-bottom: 0.8rem;
}
ul, ol {
padding: 0;
}
ul.menuitems {
list-style: none;
margin: 3rem 0 0 0;
font-size: 0.9rem;
}
#theme-toggle,
#font-toggle {
background: none;
border: none;
padding: 0;
margin: 0;
font-size: 1.1rem;
line-height: 1;
color: var(--main-link-color);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
opacity: 0.85;
transition: opacity 0.15s ease;
}
#theme-toggle:hover,
#theme-toggle:focus-visible,
#font-toggle:hover,
#font-toggle:focus-visible {
opacity: 1;
}
#accent-toggle {
width: 0.9rem;
height: 0.9rem;
padding: 0;
border-radius: 50%;
background: linear-gradient(90deg, var(--accent-default) 50%, var(--accent-alt) 50%);
border: none;
cursor: pointer;
opacity: 0.85;
transition: opacity 0.15s ease, transform 0.15s ease;
}
#accent-toggle:hover,
#accent-toggle:focus-visible {
opacity: 1;
transform: scale(1.1);
}
#theme-toggle:focus-visible,
#accent-toggle:focus-visible,
#font-toggle:focus-visible {
outline: 2px solid hsl(220, 90%, 52%);
outline-offset: 2px;
}
#font-toggle {
font-family: sans-serif;
font-size: 0.95rem;
}
#banner, #contentinfo {
width: 100%;
text-align: center;
}
#contentinfo {
flex-shrink: 0;
margin-top: 40px
}
#container {
flex: 1 0 auto;
display: flex;
align-items: stretch;
max-width: 100%;
}
@media only screen and (max-width: 1024px) {
#container {
flex-flow: row wrap;
}
}
#menu {
min-width: 300px;
}
#pages:before {
content: "Pages:";
}
#recent-articles:before {
content: "Recent Articles:";
}
#categories:before {
content: "Categories:";
}
#tag-cloud {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
list-style: none;
max-width: 300px;
}
#tag-cloud:before {
content: "Tags:";
display: block;
width: 100%;
font-size: 1.4rem;
line-height: 1.8rem;
margin-bottom: 0.75rem;
}
#tag-cloud li {
margin: 0;
}
#tag-cloud a {
display: inline;
-webkit-line-clamp: unset;
overflow: visible;
}
#tag-cloud li.tag-weight-1 a { font-size: 0.7rem; opacity: 0.7; }
#tag-cloud li.tag-weight-2 a { font-size: 0.8rem; opacity: 0.85; }
#tag-cloud li.tag-weight-3 a { font-size: 0.9rem; opacity: 1; }
#tag-cloud li.tag-weight-4 a { font-size: 1rem; opacity: 1; font-weight: bold; }
#translations {
text-align: right;
}
#translations:before {
content: "Translations: ";
}
/* "ul.social-links", not ".social-links": the global reset rule
(body, h1, ..., ul[class], ol[class], ..., dd { margin: 0; }) matches
via ul[class] at specificity (0,0,1,1), which beats a plain single-class
selector like ".social-links" (0,0,1,0) regardless of source order.
Adding the "ul" type selector ties it at (0,0,1,1), so this rule (being
later in the file) wins instead of always being zeroed back out. */
ul.social-links {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 0.75rem;
list-style: none;
/* Clearly more than double the standard 3rem inter-section gap (e.g.
the gap above "Tags:") to set the icon row apart from the sidebar nav. */
margin: 10rem 0 0 0;
}
.social-links li {
margin: 0;
}
.social-links a {
display: flex;
align-items: center;
justify-content: center;
color: var(--main-link-color);
opacity: 0.85;
transition: opacity 0.15s ease;
}
.social-links a:hover,
.social-links a:focus-visible {
opacity: 1;
}
.social-links svg {
width: 1.25rem;
height: 1.25rem;
}
/* About-me page variant: bigger icons, distinct gap from the text above.
Spacing to the preceding text is handled by .social-links-divider's
own margins, so this only needs the gap from divider to icons.
"ul.social-links--large" for the same specificity reason as above. */
ul.social-links--large {
margin-top: 3rem;
gap: 1.5rem;
}
.social-links--large svg {
width: 5rem;
height: 5rem;
}
.social-links-divider {
border: none;
border-top: 1px solid var(--table-border-color);
width: 4rem;
margin: 8rem auto 0 auto;
}
.menuitems {
list-style: none;
margin: 3rem 0 0 0;
font-size: 0.9rem;
}
.menuitems li {
margin-bottom: 0.85rem;
}
.menuitems:before {
display: block;
font-size: 1.4rem;
line-height: 1.8rem;
margin-bottom: 0.75rem;
}
.menuitems a {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
line-height: 1.3;
padding-bottom: 1px;
}
#content {
flex: 1 1 auto;
}
/*#post-list > li:first-child > article > header > h2,
main h2:first-child{
margin-top: 0;
}*/
#post-list li {
list-style: none;
margin: 0;
}
.entry-title {
text-align: center;
}
div.post-info {
text-align: center;
}
.author a {
margin: 0.85rem 0;
font-variant-caps: small-caps;
text-align: center;
}
footer.post-info {
display: flex;
flex-flow: row wrap;
justify-content: space-between;
padding: 1rem;
}
/*
* ToC
*/
.toc a,
.entry-content a.headerlink {
pointer-events: auto;
cursor: pointer;
}
.toc {
padding: 1rem 1.5rem;
margin: 1.5rem 0;
}
.toc ul {
list-style: none;
padding-left: 1.25rem;
margin: 0.25rem 0;
counter-reset: toc-item;
}
.toc > ul {
padding-left: 0;
}
.toc li {
counter-increment: toc-item;
}
.toc li::before {
content: counters(toc-item, '.') '. ';
padding-right: 0.5rem;
color: var(--main-link-color);
}
/*
* Headings
*/
.entry-content {
counter-reset: entrylinks 0 figures 0 tables 0 listings 0 h2counter 0;
}
.entry-content a {
text-decoration: none;
color: inherit;
outline: none;
cursor: default;
pointer-events: none;
}
.entry-content a.headerlink {
opacity: 0;
margin-left: 0.5rem;
text-decoration: none;
color: var(--main-link-color);
transition: opacity 0.15s ease;
}
#
.entry-content h1:hover a.headerlink,
.entry-content h2:hover a.headerlink,
.entry-content h3:hover a.headerlink,
.entry-content h4:hover a.headerlink,
.entry-content h5:hover a.headerlink,
.entry-content h6:hover a.headerlink {
opacity: 1;
}
.entry-content a:not(.toc a):not(.headerlink) {
counter-increment: entrylinks;
}
.entry-content a:not(.toc a):not(.headerlink):after {
content: '[' counter(entrylinks) ']';
margin-left: 2px;
color: var(--main-link-color);
cursor: pointer;
pointer-events: auto;
}
/*
* Heading numbering
*/
.entry-content h2 {
counter-reset: h3counter;
counter-increment: h2counter;
}
.entry-content h3 {
counter-reset: h4counter;
counter-increment: h3counter;
}
.entry-content h4 {
counter-increment: h4counter;
}
.entry-content h2::before {
content: counter(h2counter) '. ';
}
.entry-content h3::before {
content: counter(h2counter) '.' counter(h3counter) '. ';
}
.entry-content h4::before {
content: counter(h2counter) '.' counter(h3counter) '.' counter(h4counter) '. ';
}
/*
* Lists
*/
.entry-content ol,
.entry-content ul {
padding-left: 40px;
}
.entry-content li>ol,
.entry-content li>ul {
padding-left: 20px;
}
/*
* Images
*/
img, svg {
max-width: 100%;
height: auto;
}
svg.injected-svg text,
svg.injected-svg tspan {
font-family: var(--main-font);
}
.entry-content img,
.entry-content svg.injected-svg {
counter-increment: figures;
display: block;
max-width: 80%;
width: auto;
height: auto;
margin: 0 auto 0 auto;
padding: 1rem;
cursor: zoom-in;
}
.entry-content img~em,
.entry-content svg.injected-svg~em{
display: block;
margin: 0 auto 0 auto;
text-align: center;
font-style: normal;
}
.entry-content img~em:before,
.entry-content svg.injected-svg~em:before {
content: 'Figure ' counter(figures) ': ';
font-weight: bold;
}
/*
* Lightbox
*/
.lightbox-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: rgba(255, 255, 255, 0.95);
z-index: 1000;
cursor: zoom-out;
align-items: center;
justify-content: center;
}
.lightbox-overlay.active {
display: flex;
flex-direction: column;
}
.lightbox-overlay .lightbox-content {
display: flex;
flex-direction: column;
align-items: center;
max-width: 95vw;
max-height: 95vh;
}
.lightbox-overlay #lightbox-media {
max-width: 95vw;
max-height: 85vh;
}
.lightbox-overlay #lightbox-media img,
.lightbox-overlay #lightbox-media svg {
max-width: 95vw;
max-height: 85vh;
object-fit: contain;
}
.lightbox-overlay #lightbox-caption {
color: var(--main-text-color);
text-align: center;
margin-top: 0.75rem;
font-size: 0.95rem;
}
.lightbox-overlay #lightbox-caption .fig-number {
font-weight: bold;
}
.lightbox-overlay #lightbox-caption .fig-number:before {
content: 'Figure ' attr(data-num) ': ';
}
/* Fallback: Systemeinstellung, nur falls kein manueller Override gesetzt ist */
@media (prefers-color-scheme: dark) {
:root:not([data-theme]) .lightbox-overlay {
background: rgba(0, 0, 0, 0.95);
}
:root:not([data-theme]) .lightbox-overlay img {
background: transparent;
}
:root:not([data-theme]) .lightbox-overlay #lightbox-caption {
color: #fff;
}
}
/* Manueller Override, gewinnt immer gegen Media-Query */
:root[data-theme="dark"] .lightbox-overlay {
background: rgba(0, 0, 0, 0.95);
}
:root[data-theme="dark"] .lightbox-overlay img {
background: transparent;
}
:root[data-theme="dark"] .lightbox-overlay #lightbox-caption {
color: #fff;
}
:root[data-theme="light"] .lightbox-overlay {
background: rgba(255, 255, 255, 0.95);
}
:root[data-theme="light"] .lightbox-overlay img {
background: #fff;
}
:root[data-theme="light"] .lightbox-overlay #lightbox-caption {
color: #111;
}
/*
* Tables
*/
.entry-content table:not([class="highlighttable"]) {
counter-increment: tables;
max-width: 80%;
margin: 0 auto 0 auto;
padding: 1rem;
border-collapse: collapse;
border-spacing: 0;
}
.entry-content table~p > em{
display: block;
margin: 0 auto 0 auto;
text-align: center;
font-style: normal;
}
.entry-content table~p > em:before {
content: 'Table ' counter(tables) ': ';
font-weight: bold;
}
.entry-content th, td {
padding: 0.5rem;
}
.entry-content td {
border-bottom: 1px solid var(--table-border-color);
}
.entry-content th:not([align]), td:not([align]) {
text-align: left;
}
.entry-content th:empty,
.entry-content td:empty {
border-left: 1px solid var(--table-border-color);
width: 0;
padding: 0;
}
.entry-content th:empty~th:empty,
.entry-content td:empty~td:empty {
border-left: 1px double var(--table-border-color);
}
.entry-content thead th {
border-bottom: 2px solid var(--table-head-border-color);
}
.entry-content tfoot th {
border-top: 2px solid var(--table-head-border-color);
}
/*
* Code
*/
.entry-content table.highlighttable,
.entry-content div.highlight {
width: 100%;
max-width: 100%;
}
.entry-content div.highlight {
counter-increment: listings;
}
.entry-content table.highlighttable~p > em,
.entry-content div.highlight~p > em {
display: block;
margin: 0 auto 0 auto;
text-align: center;
font-style: normal;
}
.entry-content table.highlighttable~p > em:before,
.entry-content div.highlight~p > em:before {
content: 'Listing ' counter(listings) ': ';
font-weight: bold;
}
.entry-content td.linenos,
.entry-content td.code {
border-bottom: none;
}
.entry-content code, pre {
font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
font-size: 85%;
}
.entry-content pre {
max-width: 100%;
overflow: auto;
border-radius: 4px;
}
.entry-content pre code {
font-size: 95%;
position: relative;
}
.linenos {
width: 3em;
}
/* This is old stuff, inherited from LaTeX.css, probably unused */
/* Make footnote text smaller and left align it (looks bad with long URLs) */
.footnotes p {
text-align: left;
line-height: 1.5;
font-size: 85%;
margin-bottom: 0.4rem;
}
.footnotes {
border-top: 1px solid hsl(0, 0%, 39%);
}
html[lang="de"] {
#pages:before {
content: "Seiten:";
}
#recent-articles:before {
content: "Neueste Artikel:";
}
#categories:before {
content: "Kategorien:";
}
#translations:before {
content: "Übersetzungen:";
}
.entry-content img~em:before,
.entry-content svg.injected-svg~em:before {
content: 'Abbildung ' counter(figures) ': ';
}
.entry-content table~p > em:before {
content: 'Tabelle ' counter(tables) ': ';
}
.entry-content table.highlighttable~p > em:before,
.entry-content div.highlight~p > em:before {
content: 'Liste ' counter(listings) ': ';
}
.lightbox-overlay #lightbox-caption .fig-number:before {
content: 'Abbildung ' attr(data-num) ': ';
}
}