Skip to content

Commit

Permalink
Merge pull request samg#57 from danielpizarro/master
Browse files Browse the repository at this point in the history
Colorblind-safe pallete available
  • Loading branch information
samg committed Feb 10, 2015
2 parents f218c22 + f81c258 commit 9f4b9ec
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ There's some pretty nice css provided in `Diffy::CSS`.
.diff li.diff-comment { display: none; }
.diff li.diff-block-info { background: none repeat scroll 0 0 gray; }


There's also a colorblind-safe version of the pallete provided in `Diffy::CSS_COLORBLIND_1`.


Other Diff Options
------------------

Expand Down
17 changes: 17 additions & 0 deletions lib/diffy/css.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,21 @@ module Diffy
.diff li.diff-comment { display: none; }
.diff li.diff-block-info { background: none repeat scroll 0 0 gray; }
STYLE

CSS_COLORBLIND_1 = <<-STYLE
.diff{overflow:auto;}
.diff ul{background:#fff;overflow:auto;font-size:13px;list-style:none;margin:0;padding:0;display:table;width:100%;}
.diff del, .diff ins{display:block;text-decoration:none;}
.diff li{padding:0; display:table-row;margin: 0;height:1em;}
.diff li.ins{background:#ddf; color:#008}
.diff li.del{background:#fee; color:#b00}
.diff li:hover{background:#ffc}
/* try 'whitespace:pre;' if you don't want lines to wrap */
.diff del, .diff ins, .diff span{white-space:pre-wrap;font-family:courier;}
.diff del strong{font-weight:normal;background:#fcc;}
.diff ins strong{font-weight:normal;background:#99f;}
.diff li.diff-comment { display: none; }
.diff li.diff-block-info { background: none repeat scroll 0 0 gray; }
STYLE

end

0 comments on commit 9f4b9ec

Please sign in to comment.