From 0414f6bcb57e109cc58a3eda441cca07be38abcc Mon Sep 17 00:00:00 2001 From: Mikko Ahlroth Date: Mon, 19 Nov 2018 20:00:29 +0200 Subject: [PATCH] Fix code block size on mobile --- lib/web/frontend/src/style/post-layout.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/web/frontend/src/style/post-layout.scss b/lib/web/frontend/src/style/post-layout.scss index 4e8a20d..c44d0fc 100644 --- a/lib/web/frontend/src/style/post-layout.scss +++ b/lib/web/frontend/src/style/post-layout.scss @@ -23,6 +23,11 @@ } } + pre[class*="language-"] { + // Code should not enlargen mobile layouts, so remove 40px for padding. + max-width: calc(100vw - 20px * 2); + } + iframe.youtube { display: block; width: 100%;