From c56a182d1471b1d12e96612cb88bd4c890d662fe Mon Sep 17 00:00:00 2001 From: slonkazoid Date: Fri, 19 Apr 2024 16:46:26 +0300 Subject: [PATCH] improve css --- static/post.css | 31 +++++++++++++++++++++++++++---- static/style.css | 7 +++++-- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/static/post.css b/static/post.css index 8f4c0b1..bbd239a 100644 --- a/static/post.css +++ b/static/post.css @@ -1,5 +1,7 @@ .anchor { text-decoration: none; + font-size: x-large; + vertical-align: middle; } .anchor::before { content: "ยง"; @@ -9,8 +11,10 @@ } code { - font-size: larger; - padding: 0.15em 0.4em; + padding: 0.15em 0.3em; + overflow-wrap: break-word; + word-break: break-all; + white-space: pre-wrap; background-color: var(--surface0); color: var(--subtext1); @@ -21,8 +25,6 @@ pre > code { border: 2px solid var(--surface0); padding: 1.25em 1.5em; display: block; - overflow-wrap: break-word; - white-space: pre-wrap; background-color: var(--base); color: var(--text); @@ -31,3 +33,24 @@ pre > code { img { max-width: 100%; } + +table, +td, +th { + border: 1px solid var(--text); + border-collapse: collapse; + padding: 0.5em; +} + +th { + font-weight: bold; +} + +td { + word-break: break-word; +} + +th, +td:nth-child(1) { + word-break: keep-all; +} diff --git a/static/style.css b/static/style.css index 178efe5..11e425a 100644 --- a/static/style.css +++ b/static/style.css @@ -27,11 +27,14 @@ } } -:root { +:root, +code { /* please have one at least one good monospace font */ - font-family: "Hack Nerd Font", "Hack", "JetBrains Mono", + font-family: "Hack", "Hack Nerd Font", "JetBrains Mono", "JetBrainsMono Nerd Font", "Ubuntu Mono", monospace, sans-serif; +} +:root { background-color: var(--base); color: var(--text); }