Changeset - 1cd6e633bab8
[Not reviewed]
default
0 2 0
domruf - 8 years ago 2017-10-26 00:50:22
dominikruf@gmail.com
less: simplify positioning of the +/- symbols on diff lines

As before, we place the +/- symbols in the pre:before so they default to the
same font and styling as the line content.

Instead of giving the pre a wide left margin and put the :before out there
using negative positing and visible overflow, just give the :before a fixed
width on all lines.

This change has been modified by Mads Kiilerich.
2 files changed with 4 insertions and 30 deletions:
0 comments (0 inline, 0 general)
kallithea/public/css/style.css
Show inline comments
 
@@ -1629,8 +1629,6 @@ table.code-difftable .code {
 
  display: block;
 
}
 
table.code-difftable .code pre {
 
  margin: 0 0 0 12px !important;
 
  padding: 0;
 
  min-height: 17px;
 
  line-height: 17px;
 
  white-space: pre-wrap;
 
@@ -1640,25 +1638,14 @@ table.code-difftable .code pre {
 
table.code-difftable .del .code pre:before {
 
  content: "-";
 
  color: #800;
 
  float: left;
 
  left: -1em;
 
  position: relative;
 
  width: 0;
 
}
 
table.code-difftable .add .code pre:before {
 
  content: "+";
 
  color: #080;
 
  float: left;
 
  left: -1em;
 
  position: relative;
 
  width: 0;
 
}
 
table.code-difftable .unmod .code pre:before {
 
table.code-difftable .code pre:before {
 
  content: " ";
 
  float: left;
 
  left: -1em;
 
  position: relative;
 
  width: 0;
 
  margin: 0 2px;
 
}
 
/* comment bubble */
 
.add-bubble {
kallithea/public/less/kallithea-diff.less
Show inline comments
 
@@ -160,8 +160,6 @@ table.code-difftable .code {
 
  display: block;
 
}
 
table.code-difftable .code pre {
 
  margin: 0 0 0 12px !important;
 
  padding: 0;
 
  min-height: 17px;
 
  line-height: 17px;
 
  white-space: pre-wrap;
 
@@ -172,25 +170,14 @@ table.code-difftable .code pre {
 
table.code-difftable .del .code pre:before {
 
  content: "-";
 
  color: #800;
 
  float: left;
 
  left: -1em;
 
  position: relative;
 
  width: 0;
 
}
 
table.code-difftable .add .code pre:before {
 
  content: "+";
 
  color: #080;
 
  float: left;
 
  left: -1em;
 
  position: relative;
 
  width: 0;
 
}
 
table.code-difftable .unmod .code pre:before {
 
table.code-difftable .code pre:before {
 
  content: " ";
 
  float: left;
 
  left: -1em;
 
  position: relative;
 
  width: 0;
 
  margin: 0 2px;
 
}
 

	
 
/* comment bubble */
0 comments (0 inline, 0 general)