[gitg/wip/techlivezh/diff-view-clean-up: 5/21] Use '<span>' instead '<div>'



commit 7f44ad5a728fecf0c4ff22a190619761129306f2
Author: Techlive Zheng <techlivezheng gmail com>
Date:   Mon Dec 9 01:18:19 2013 +0800

    Use '<span>' instead '<div>'

 libgitg/resources/diff-view-html-builder.js |    2 +-
 libgitg/resources/diff-view.css             |   16 +++++++---------
 2 files changed, 8 insertions(+), 10 deletions(-)
---
diff --git a/libgitg/resources/diff-view-html-builder.js b/libgitg/resources/diff-view-html-builder.js
index 088e25d..a942e21 100644
--- a/libgitg/resources/diff-view-html-builder.js
+++ b/libgitg/resources/diff-view-html-builder.js
@@ -132,7 +132,7 @@ function diff_file(file, lnstate, data)
        var addedp = Math.floor(added / total * 100);
        var removedp = 100 - addedp;
 
-       var stats = '<div class="expander">-</div><div class="stats"><span class="number">' + (added + 
removed)  + '</span><span class="bar"><span class="added" style="width: ' + addedp + '%;"></span><span 
class="removed" style="width: ' + removedp + '%;"></span></span></div>';
+       var stats = '<span class="expander">-</span><span class="stats"><span class="number">' + (added + 
removed)  + '</span><span class="bar"><span class="added" style="width: ' + addedp + '%;"></span><span 
class="removed" style="width: ' + removedp + '%;"></span></span></span>';
 
        if (data.settings.staged || data.settings.unstaged)
        {
diff --git a/libgitg/resources/diff-view.css b/libgitg/resources/diff-view.css
index 3f53f5b..1960523 100644
--- a/libgitg/resources/diff-view.css
+++ b/libgitg/resources/diff-view.css
@@ -98,9 +98,7 @@ div.file tr.file_header td {
   background: #d3d7cf;
 }
 
-div.expander {
-  float:left;
-
+span.expander {
   background-color: #ececec;
   border-radius: 5px;
   box-shadow: 1px 1px #ccc inset;
@@ -117,7 +115,7 @@ tbody.collapsed > :not(.file_header) {
   display:none;
 }
 
-div.stats {
+span.stats {
   width: 75px;
   background-color: #ececec;
   padding: 3px;
@@ -128,27 +126,27 @@ div.stats {
   vertical-align: middle;
 }
 
-div.stats .number, div.stats .bar {
+span.stats .number, span.stats .bar {
   display: table-cell;
   vertical-align: middle;
 }
 
-div.stats .bar {
+span.stats .bar {
   width: 100%;
   padding: 0px 0px 0px 6px;
 }
 
-div.stats .added, div.stats .removed {
+span.stats .added, span.stats .removed {
   height: 5px;
   float: left;
   display: block;
 }
 
-div.stats .added {
+span.stats .added {
   background-color: #33cc33;
 }
 
-div.stats .removed {
+span.stats .removed {
   background-color: #cc3333;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]