# HG changeset patch # User domruf # Date 2017-10-26 00:50:22 # Node ID 1cd6e633bab8e3c32f85fb4faac8a3a62e3cae09 # Parent ecd53d8e4adc67b79abb67ba0138af47209fe180 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. diff --git a/kallithea/public/css/style.css b/kallithea/public/css/style.css --- a/kallithea/public/css/style.css +++ b/kallithea/public/css/style.css @@ -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 { diff --git a/kallithea/public/less/kallithea-diff.less b/kallithea/public/less/kallithea-diff.less --- a/kallithea/public/less/kallithea-diff.less +++ b/kallithea/public/less/kallithea-diff.less @@ -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 */