summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-07-21 23:41:09 -0600
committerLuke Shumaker <lukeshu@lukeshu.com>2023-07-21 23:41:09 -0600
commit079efbc10b5e8c89e4f87b017ffa02e9d32aefb3 (patch)
tree0188180dc6a1ff3671e3aacef9c1dd749462889e
parentc045654a862bc1119fa4e7584fff9d2a965192ea (diff)
Fuss with the CSS to make Firefox for Android happy
-rw-r--r--public/assets/style.css22
1 files 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;
}
}