Mercurial > kallithea
changeset 7034:1cd6e633bab8
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.
author | domruf <dominikruf@gmail.com> |
---|---|
date | Thu, 26 Oct 2017 00:50:22 +0200 |
parents | ecd53d8e4adc |
children | b983522e7c13 |
files | kallithea/public/css/style.css kallithea/public/less/kallithea-diff.less |
diffstat | 2 files changed, 4 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/public/css/style.css Wed Oct 25 22:41:45 2017 +0200 +++ b/kallithea/public/css/style.css Thu Oct 26 00:50:22 2017 +0200 @@ -1629,8 +1629,6 @@ 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 .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 {
--- a/kallithea/public/less/kallithea-diff.less Wed Oct 25 22:41:45 2017 +0200 +++ b/kallithea/public/less/kallithea-diff.less Thu Oct 26 00:50:22 2017 +0200 @@ -160,8 +160,6 @@ 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 .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 */