Changeset - 13b202c88e41
[Not reviewed]
default
0 3 0
domruf - 8 years ago 2017-10-26 23:03:07
dominikruf@gmail.com
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.
3 files changed with 21 insertions and 30 deletions:
0 comments (0 inline, 0 general)
kallithea/public/css/style.css
Show inline comments
 
/*!
 
 * Don't edit the css file directly.
 
 *
 
 * Instead, edit the less file(s) and regenerate the css:
 
 *
 
 * npm --prefix kallithea/public/less install
 
 * npm --prefix kallithea/public/less run less
 
 *
 
 */
 
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;
 
}
 
a:hover {
 
  color: #576622;
 
  text-decoration: underline;
 
}
 
code,
 
.code pre,
 
.linenos pre,
 
div.readme pre,
 
@@ -100,24 +85,30 @@ nav.navbar {
 
}
 
/* logo */
 
.navbar-brand .branding:before {
 
  content: "";
 
  display: inline-block;
 
  margin-right: .2em;
 
  background-image: url("../images/kallithea-logo.svg");
 
  width: 140px;
 
  height: 30px;
 
  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) {
 
  overflow-x: auto;
 
  min-height: 0.01%;
 
}
 
/* language bars (summary page) */
 
#lang_stats .progress-bar {
 
  min-width: 15px;
 
  border-top-right-radius: 8px;
 
  border-bottom-right-radius: 8px;
 
}
 
@@ -1630,24 +1621,28 @@ BIN_FILENODE = 6
 
  background: none repeat scroll 0 0 #FFF !important;
 
  padding-left: 2px;
 
  padding-right: 2px;
 
  text-align: right;
 
  width: 30px;
 
  -moz-user-select: none;
 
  -webkit-user-select: none;
 
}
 
.code-difftable .code {
 
  display: block;
 
}
 
.code-difftable .code pre {
 
  border: 0;
 
  padding: 0;
 
  margin: 0;
 
  background: none;
 
  min-height: 17px;
 
  line-height: 17px;
 
  white-space: pre-wrap;
 
  word-break: break-all;
 
}
 
.code-difftable .del .code pre:before {
 
  content: "-";
 
  color: #800;
 
}
 
.code-difftable .add .code pre:before {
 
  content: "+";
 
  color: #080;
kallithea/public/less/kallithea-diff.less
Show inline comments
 
@@ -149,24 +149,28 @@ BIN_FILENODE = 6
 
    padding-left: 2px;
 
    padding-right: 2px;
 
    text-align: right;
 
    width: 30px;
 
    -moz-user-select: none;
 
    -webkit-user-select: none;
 
  }
 
  /** CODE **/
 
  .code {
 
    display: block;
 
  }
 
  .code pre {
 
    border: 0;
 
    padding: 0;
 
    margin: 0;
 
    background: none;
 
    min-height: 17px;
 
    line-height: 17px;
 
    white-space: pre-wrap;
 
    word-break: break-all;
 
  }
 

	
 
  /* leading +/- on changed lines */
 
  .del .code pre:before {
 
    content: "-";
 
    color: #800;
 
  }
 
  .add .code pre:before {
kallithea/public/less/style.less
Show inline comments
 
@@ -4,39 +4,24 @@
 
 * Instead, edit the less file(s) and regenerate the css:
 
 *
 
 * npm --prefix kallithea/public/less install
 
 * npm --prefix kallithea/public/less run less
 
 *
 
 */
 

	
 
@import "kallithea-variables.less";
 

	
 
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;
 
}
 
a:hover {
 
  color: #576622;
 
  text-decoration: underline;
 
}
 
code,
 
.code pre,
 
.linenos pre,
 
@@ -114,24 +99,31 @@ nav.navbar {
 
  &:before {
 
    content: "";
 
    display: inline-block;
 
    margin-right: .2em;
 
    background-image: url(@kallithea-logo-url);
 
    width: @kallithea-logo-width;
 
    height: @kallithea-logo-height;
 
    margin-bottom: -@kallithea-logo-bottom;
 
    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){
 
  overflow-x: auto;
 
  min-height: 0.01%;
 
}
 

	
 
/* language bars (summary page) */
 
#lang_stats {
 
  .progress-bar {
 
    min-width: 15px;
 
    border-top-right-radius: 8px;
0 comments (0 inline, 0 general)