From 079efbc10b5e8c89e4f87b017ffa02e9d32aefb3 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 21 Jul 2023 23:41:09 -0600 Subject: Fuss with the CSS to make Firefox for Android happy --- public/assets/style.css | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/public/assets/style.css b/public/assets/style.css index e653c21..1dbdb3d 100644 --- a/public/assets/style.css +++ b/public/assets/style.css @@ -30,10 +30,28 @@ li p + ul { margin-top: -1em; } kbd, code, samp, tt, pre { background: #DDDDFF; - white-space: pre; +} +kbd, code, samp, tt, { + white-space: pre-wrap; +} +@media screen { + /* Firefox for Android does weird hacks with font-size. In + * particular, `white-space: pre` is broken on Firefox for + * Android if you don't set an absolute font-size. So this is + * a hack to get reasonable behavior without setting + * `white-space: pre`. */ + pre { + white-space: pre-wrap; + overflow-x: auto; + } + pre > code { + white-space: pre-wrap; + display: block; + min-width: max-content; + } } @media print { - kbd, code, samp, tt, pre { + pre, pre > code { white-space: pre-wrap; } } -- cgit v1.1-4-g5e80