From a228cf1c11c47a797202556d07a513eee66244a4 Mon Sep 17 00:00:00 2001 From: Caroline Moore Date: Tue, 29 Oct 2024 13:04:48 -0400 Subject: [PATCH 1/4] Update whitespace styles to allow wrapping --- syntaxhighlighter3/styles/shCore.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/syntaxhighlighter3/styles/shCore.css b/syntaxhighlighter3/styles/shCore.css index 88a4956..e7e953d 100644 --- a/syntaxhighlighter3/styles/shCore.css +++ b/syntaxhighlighter3/styles/shCore.css @@ -59,6 +59,7 @@ } .syntaxhighlighter { + box-sizing: border-box; width: 100% !important; margin: 1em 0 1em 0 !important; position: relative !important; @@ -80,7 +81,7 @@ font-style: italic !important; } .syntaxhighlighter .line { - white-space: pre !important; + white-space: pre-wrap; } .syntaxhighlighter table { table-layout: auto !important; From a87a6fa19a5f6b243cd27d937656a82af6cd80cc Mon Sep 17 00:00:00 2001 From: Caroline Moore Date: Tue, 29 Oct 2024 13:48:49 -0400 Subject: [PATCH 2/4] use :has --- syntaxhighlighter3/styles/shCore.css | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/syntaxhighlighter3/styles/shCore.css b/syntaxhighlighter3/styles/shCore.css index e7e953d..0953122 100644 --- a/syntaxhighlighter3/styles/shCore.css +++ b/syntaxhighlighter3/styles/shCore.css @@ -63,11 +63,14 @@ width: 100% !important; margin: 1em 0 1em 0 !important; position: relative !important; - overflow: auto !important; + overflow-x: scroll !important; overflow-y: hidden !important; font-size: 1em !important; padding: 0.5em 1em !important; } +.entry-content:has(.syntaxhighlighter) { + max-width: 100% !important; +} .syntaxhighlighter code { display: inline !important; } @@ -81,7 +84,7 @@ font-style: italic !important; } .syntaxhighlighter .line { - white-space: pre-wrap; + white-space: pre !important; } .syntaxhighlighter table { table-layout: auto !important; From 4bfdc219943e6698b2fb9a9b2eb2d6bd01ce495c Mon Sep 17 00:00:00 2001 From: Caroline Moore Date: Wed, 13 Nov 2024 10:33:39 -0500 Subject: [PATCH 3/4] Remove theme-specific styles --- syntaxhighlighter3/styles/shCore.css | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/syntaxhighlighter3/styles/shCore.css b/syntaxhighlighter3/styles/shCore.css index 0953122..775991d 100644 --- a/syntaxhighlighter3/styles/shCore.css +++ b/syntaxhighlighter3/styles/shCore.css @@ -63,14 +63,11 @@ width: 100% !important; margin: 1em 0 1em 0 !important; position: relative !important; - overflow-x: scroll !important; + overflow-x: auto !important; overflow-y: hidden !important; font-size: 1em !important; padding: 0.5em 1em !important; } -.entry-content:has(.syntaxhighlighter) { - max-width: 100% !important; -} .syntaxhighlighter code { display: inline !important; } From ee0fdcde505b7124e703f3e621beb969d6dc94b8 Mon Sep 17 00:00:00 2001 From: Caroline Moore Date: Wed, 13 Nov 2024 10:34:01 -0500 Subject: [PATCH 4/4] Revert overflow style changes --- syntaxhighlighter3/styles/shCore.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntaxhighlighter3/styles/shCore.css b/syntaxhighlighter3/styles/shCore.css index 775991d..5aea604 100644 --- a/syntaxhighlighter3/styles/shCore.css +++ b/syntaxhighlighter3/styles/shCore.css @@ -63,7 +63,7 @@ width: 100% !important; margin: 1em 0 1em 0 !important; position: relative !important; - overflow-x: auto !important; + overflow: auto !important; overflow-y: hidden !important; font-size: 1em !important; padding: 0.5em 1em !important;