changeset 7046:13b202c88e41

less: only override Bootstrap default styling of pre where it really is needed Bootstrap changes the styling of pre, even without special classes. Thus, override the bootstrap default styling in a less broad manner. The only thing that really needs to be changed is the border, margin, padding and the background for the code diffs.
author domruf <dominikruf@gmail.com>
date Thu, 26 Oct 2017 23:03:07 +0200
parents 99f81d23ea20
children 188450ba880e
files kallithea/public/css/style.css kallithea/public/less/kallithea-diff.less kallithea/public/less/style.less
diffstat 3 files changed, 21 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/public/css/style.css	Wed Oct 25 20:37:52 2017 +0200
+++ b/kallithea/public/css/style.css	Thu Oct 26 23:03:07 2017 +0200
@@ -10,21 +10,6 @@
 body {
   background: url("../images/background.png") repeat scroll 0 0 #B0B0B0;
 }
-/* Undo unfortunate Bootstrap default styling */
-body pre {
-  display: inherit;
-  padding: inherit;
-  margin: inherit;
-  font-size: inherit;
-  line-height: inherit;
-  color: inherit;
-  word-break: inherit;
-  word-wrap: inherit;
-  background-color: inherit;
-  border: inherit;
-  border-radius: inherit;
-  overflow: inherit;
-}
 a {
   color: #577632;
   text-decoration: none;
@@ -109,6 +94,12 @@
   margin-bottom: -4px;
   margin-top: -12px;
 }
+/* code highlighting */
+/* don't use bootstrap style for code blocks */
+.code-highlighttable pre {
+  background: inherit;
+  border: 0;
+}
 /* every direct child of a panel, that is not .panel-heading, should auto
  * overflow to prevent overflowing of elements like text boxes and tables */
 .panel > :not(.panel-heading) {
@@ -1639,6 +1630,10 @@
   display: block;
 }
 .code-difftable .code pre {
+  border: 0;
+  padding: 0;
+  margin: 0;
+  background: none;
   min-height: 17px;
   line-height: 17px;
   white-space: pre-wrap;
--- a/kallithea/public/less/kallithea-diff.less	Wed Oct 25 20:37:52 2017 +0200
+++ b/kallithea/public/less/kallithea-diff.less	Thu Oct 26 23:03:07 2017 +0200
@@ -158,6 +158,10 @@
     display: block;
   }
   .code pre {
+    border: 0;
+    padding: 0;
+    margin: 0;
+    background: none;
     min-height: 17px;
     line-height: 17px;
     white-space: pre-wrap;
--- a/kallithea/public/less/style.less	Wed Oct 25 20:37:52 2017 +0200
+++ b/kallithea/public/less/style.less	Thu Oct 26 23:03:07 2017 +0200
@@ -13,21 +13,6 @@
 body {
   background: url("../images/background.png") repeat scroll 0 0 #B0B0B0;
 }
-/* Undo unfortunate Bootstrap default styling */
-body pre {
-  display: inherit;
-  padding: inherit;
-  margin: inherit;
-  font-size: inherit;
-  line-height: inherit;
-  color: inherit;
-  word-break: inherit;
-  word-wrap: inherit;
-  background-color: inherit;
-  border: inherit;
-  border-radius: inherit;
-  overflow: inherit;
-}
 
 a {
   color: #577632;
@@ -123,6 +108,13 @@
   }
 }
 
+/* code highlighting */
+/* don't use bootstrap style for code blocks */
+.code-highlighttable pre {
+  background: inherit;
+  border: 0;
+}
+
 /* every direct child of a panel, that is not .panel-heading, should auto
  * overflow to prevent overflowing of elements like text boxes and tables */
 .panel > :not(.panel-heading){