diff options
author | Radu <radu@pml4t.net> | 2023-11-23 14:21:12 -0500 |
---|---|---|
committer | Radu <radu@pml4t.net> | 2023-11-23 14:48:56 -0500 |
commit | ef17d1d29212f5dc0218bfca1c30709e5a35f7b2 (patch) | |
tree | e2906ef5beb1eb1d705639016a3520c05b6ca1cb | |
parent | af1e27cb8bc97c12fbea83bc55b7debc582aec33 (diff) |
Reduce spacing around code and round corners
-rw-r--r-- | page.js | 1 | ||||
-rw-r--r-- | styles.css | 14 |
2 files changed, 15 insertions, 0 deletions
@@ -38,6 +38,7 @@ function handleMsg() { const code = block.slice(newlineIdx + 1); const preEl = document.createElement("pre"); + preEl.classList.add("code-block"); const codeEl = document.createElement("code"); if (lang) codeEl.classList.add("language-" + lang); codeEl.appendChild(document.createTextNode(code)); @@ -6,3 +6,17 @@ math { font-family: "STIXTwoMath"; } + +code.hljs { + padding: 2px; + border-radius: 2px; +} + +pre code.hljs { + padding: 0.5em; + border-radius: 0.5em; +} + +pre.code-block { + margin: 0.5em 0; +} |