From edca539b87fadd4cc99d0bd3995821a60c5e1c05 Mon Sep 17 00:00:00 2001 From: Ze Bateira Date: Fri, 16 Apr 2021 15:07:14 +0100 Subject: [PATCH] fix: allow scroll on code blocks to avoid text wrap --- src/.vuepress/theme/styles/index.css | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/.vuepress/theme/styles/index.css b/src/.vuepress/theme/styles/index.css index 157f6989..4110d612 100644 --- a/src/.vuepress/theme/styles/index.css +++ b/src/.vuepress/theme/styles/index.css @@ -9,16 +9,7 @@ pre { padding: 1.25rem 1.5rem; background-color: #0e2333; border-radius: 6px; -} - -pre > code { - padding: 0; - background-color: transparent; - border-radius: 0; - color: #fff; - font-size: 0.85em; - white-space: pre-wrap; - word-break: break-all; + overflow-x: auto; } code { @@ -28,4 +19,16 @@ code { border-radius: 3px; color: rgba(51, 51, 51, 0.8); font-size: 0.85em; + white-space: pre-wrap; + word-break: break-all; +} + +pre > code { + padding: 0; + background-color: transparent; + border-radius: 0; + color: #fff; + font-size: 0.85em; + white-space: unset; + word-break: unset; }