Files @ 1cd6e633bab8
Branch filter:

Location: kallithea/kallithea/public/less/kallithea-diff.less

domruf
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.
/* bootstrap progress bar has margin-bottom we don't want that in files list */
.cs_files .progress {
  margin-bottom: 0;
}
/* progress bars should be aligned right */
.cs_files .changes {
  float: right;
  color: #577632;
}

/* colors for changes */
.cs_files .changes .added {
  color: inherit;
  background-color: #BBFFBB;
  float: left;
  text-align: center;
  font-size: 9px;
  padding: 2px 0px 2px 0px;
}
.cs_files .changes .deleted {
  background-color: #FF8888;
  float: left;
  text-align: center;
  font-size: 9px;
  padding: 2px 0px 2px 0px;
}
/* binary
NEW_FILENODE = 1
DEL_FILENODE = 2
MOD_FILENODE = 3
RENAMED_FILENODE = 4
CHMOD_FILENODE = 5
BIN_FILENODE = 6
*/
.changes .bin {
  background-color: #BBFFBB;
  float: left;
  text-align: center;
  font-size: 9px;
  padding: 2px 0px 2px 0px;
}
/* added binary */
.changes .bin.bin1 {
  background-color: #BBFFBB;
}
/* deleted binary*/
.changes .bin.bin2 {
  background-color: #FF8888;
}
/* mod binary*/
.changes .bin.bin3 {
  background-color: #DDDDDD;
}
/* rename file*/
.changes .bin.bin4 {
  background-color: #6D99FF;
}
/* chmod file*/
.changes .bin.bin5 {
  background-color: #6D99FF;
}

/* center collapse button */
.diff-collapse {
  text-align: center;
  margin-bottom: 15px;
}

/* the whole line should be colored */
table.code-difftable {
  border-collapse: collapse;
  border-radius: 0px !important;
  width: 100%;
}

/* line coloring */
table.code-difftable .context {
  background: none repeat scroll 0 0 #DDE7EF;
  color: #999;
}
table.code-difftable .add {
  background: none repeat scroll 0 0 #DDFFDD;
}
table.code-difftable .add ins {
  background: none repeat scroll 0 0 #AAFFAA;
  text-decoration: none;
}
table.code-difftable .del {
  background: none repeat scroll 0 0 #FFDDDD;
}
table.code-difftable .del del {
  background: none repeat scroll 0 0 #FFAAAA;
  text-decoration: none;
}

/* tabs */
table.code-difftable td.code pre u:before {
  content: "\21a6";
  display: inline-block;
  width: 0;
}
/* CR */
table.code-difftable td.code pre u.cr:before {
  content: "\21a4";
  display: inline-block;
  color: rgba(0, 0, 0, 0.5);
}
/* whitespace characters */
table.code-difftable td.code pre u {
  color: rgba(0, 0, 0, 0.15);
}
/* trailing spaces */
table.code-difftable td.code pre i {
  border-style: solid;
  border-width: 0 0 0 1px;
  color: rgba(0, 0, 0, 0.5);
}

/** LINE NUMBERS **/
table.code-difftable .lineno {
  padding-left: 2px;
  padding-right: 2px !important;
  width: 30px;
  -moz-user-select: none;
  -webkit-user-select: none;
  border-right: 1px solid #CCC !important;
  border-left: 0px solid #CCC !important;
  border-top: 0px solid #CCC !important;
  border-bottom: none !important;
  vertical-align: middle !important;
  text-align: center;
}
table.code-difftable .lineno.new {
  text-align: right;
}
table.code-difftable .lineno.old {
  text-align: right;
}
table.code-difftable .lineno a {
  color: #aaa !important;
  font: 11px Lucida Console, Consolas, Monaco, Inconsolata, Liberation Mono, monospace !important;
  padding-left: 6px;
  padding-right: 6px;
  display: block;
}
table.code-difftable .line:hover .lineno a {
  color: #333 !important;
}
table.code-difftable .lineno-inline {
  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 **/
table.code-difftable .code {
  display: block;
}
table.code-difftable .code pre {
  min-height: 17px;
  line-height: 17px;
  white-space: pre-wrap;
  word-break: break-all;
}

/* leading +/- on changed lines */
table.code-difftable .del .code pre:before {
  content: "-";
  color: #800;
}
table.code-difftable .add .code pre:before {
  content: "+";
  color: #080;
}
table.code-difftable .code pre:before {
  content: " ";
  margin: 0 2px;
}

/* comment bubble */
.add-bubble {
  position: relative;
  display: none;
  float: left;
  width: 0px;
  height: 0px;
  left: -8px;
  box-sizing: border-box;
}
/* comment bubble, only visible when in a commentable diff */
.commentable-diff tr.line.add:hover td .add-bubble,
.commentable-diff tr.line.del:hover td .add-bubble,
.commentable-diff tr.line.unmod:hover td .add-bubble {
  display: block;
  z-index: 1;
}
.add-bubble div {
  background: #577632;
  width: 16px;
  height: 16px;
  cursor: pointer;
  padding: 0 2px 2px 0.5px;
  border: 1px solid #577632;
  border-radius: 3px;
  box-sizing: border-box;
}
.add-bubble div:before {
  font-size: 14px;
  color: #ffffff;
  font-family: "kallithea";
  content: '\1f5ea';
}
.add-bubble div:hover {
  transform: scale(1.2, 1.2);
}

/* file diff icons */
.icon-diff-modified:before {
  color: #d0b44c;
}
.icon-diff-removed:before {
  color: #bd2c00;
}
.icon-diff-added:before {
  color: #6cc644;
}
.icon-diff-renamed:before {
  color: #677a85;
}