From 166ddc98a959abd0b9de9e5e7f8116490a2ac03d Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Fri, 7 Nov 2014 14:13:15 +0100 Subject: [PATCH] [FIX] allow word wrapping in stripe-style code examples --- doc/_themes/odoodoc/static/style.css | 3 +++ doc/_themes/odoodoc/static/style.less | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/_themes/odoodoc/static/style.css b/doc/_themes/odoodoc/static/style.css index 443cae9b7b5..19f5270109e 100644 --- a/doc/_themes/odoodoc/static/style.css +++ b/doc/_themes/odoodoc/static/style.css @@ -6757,6 +6757,9 @@ td.field-body > ul { width: 0; border-left: 1px solid #777777; } + .stripe .highlight pre { + white-space: pre-wrap; + } } .stripe .switcher { color: white; diff --git a/doc/_themes/odoodoc/static/style.less b/doc/_themes/odoodoc/static/style.less index a896e01e170..719fa6f10e3 100644 --- a/doc/_themes/odoodoc/static/style.less +++ b/doc/_themes/odoodoc/static/style.less @@ -469,7 +469,7 @@ div.section > h2 { padding: 4px; font-size: 75%; - // code block lines should not wrap + // don't break lines within words word-break: normal; word-wrap: normal; } @@ -595,6 +595,11 @@ td.field-body { border-left: 1px solid @gray-light; } } + + .highlight pre { + // but allow additional line-breaks between "words" to avoid overflow + white-space: pre-wrap; + } } .switcher {