From c6f47db8ba892c6beba94945c188ecb0d97d8851 Mon Sep 17 00:00:00 2001 From: Jean-Marie 'Histausse' Mineau Date: Tue, 21 Apr 2026 12:44:24 +0200 Subject: [PATCH] somewhat fix code display --- lib/html_body.typ | 18 +++++++++--------- test_template/main.typ | 2 ++ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/html_body.typ b/lib/html_body.typ index da3ce31..cc78e78 100644 --- a/lib/html_body.typ +++ b/lib/html_body.typ @@ -65,7 +65,7 @@ site-container { display: flex; flex-direction: column; - max-width: 1510px; + max-width: 60em; width: 100%; padding: 0 20px; @@ -92,16 +92,16 @@ } code-block { - display: flex; - justify-content: center; - align-items: center; - + display: block; + overflow: hidden; + border-radius: 8px; + margin: 8px; + background-color: var(--color-code-bg); + box-shadow: inset 0px 0px 5px 0px #000; pre { - width: min-content; padding: 8px; - border-radius: 8px; - background-color: var(--color-code-bg); - box-shadow: inset 0px 0px 5px 0px #000; + margin: 0; + overflow: auto; } } } diff --git a/test_template/main.typ b/test_template/main.typ index 37dbfec..cca7e15 100644 --- a/test_template/main.typ +++ b/test_template/main.typ @@ -75,6 +75,8 @@ def plopliplop(n: int) print(i) ``` +#raw(range(10).map(i => lorem(100)).join("\n"), block: true) + /* #figure({ show table: set text(size: 0.80em)