From a73ba6d447e279b8c7ef39b333b7087f8ffcee49 Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Sun, 19 May 2024 10:42:51 +0200 Subject: [PATCH] Fix light-theme code style & center figure text --- static/base.css | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/static/base.css b/static/base.css index d19a3f1..8805dcb 100644 --- a/static/base.css +++ b/static/base.css @@ -17,7 +17,14 @@ --color-link: var(--color-purple); --color-link-hv: #b16286; } +div.src .chroma { + filter: invert(1); +} + @media (prefers-color-scheme: dark) { +div.src .chroma { + filter: invert(0); +} :root { --color-purple: #b16286; --color-white: #ebdbb2; @@ -37,6 +44,10 @@ } } +:root { + font-size: 1.05rem; +} + /* CUSTOM FONTS */ @font-face { font-family: "Inclusive Sans"; @@ -170,12 +181,18 @@ figure { /* add a background to the figure (same as code block, but with smaller margins) */ border-radius: 0.4rem; background: var(--color-box); - width: calc(100% - 2 * 0.4rem); + width: fit-content; height: calc(100% - 2 * 0.4rem); border: none; padding: 0.4rem; margin-top: 1rem; overflow: auto; + + display: flex; + flex-direction: column; +} +figure > figcaption { + text-align: center; } figure > img { border-radius: 0.8rem; @@ -208,10 +225,10 @@ table tr td { padding: 0.2rem; } table tr:hover { - background: var(--color-text-dark) !important; + background: var(--color-bg) !important; } table tr:nth-child(2n) { - background: var(--color-text-dark2); + background: var(--color-base-dark); } .horizontal-table ~ table { display: flex @@ -248,8 +265,8 @@ div.captioned-content > div.caption { div.sourceCode, div.src { width: 100%; border-radius: 0.4rem; - background: var(--color-base); - border: 4px solid var(--color-base); + background: var(--color-box); + border: 4px solid var(--color-box); position: relative; overflow: hidden; } -- 2.38.5