[FIX] allow word wrapping in stripe-style code examples
authorXavier Morel <xmo@openerp.com>
Fri, 7 Nov 2014 13:13:15 +0000 (14:13 +0100)
committerXavier Morel <xmo@openerp.com>
Fri, 7 Nov 2014 13:13:15 +0000 (14:13 +0100)
doc/_themes/odoodoc/static/style.css
doc/_themes/odoodoc/static/style.less

index 443cae9..19f5270 100644 (file)
@@ -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;
index a896e01..719fa6f 100644 (file)
@@ -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 {