Commit b2c071fa authored by Douwe Maan's avatar Douwe Maan

Pretty highlighted diffs for every theme

parent 21facf53
...@@ -22,11 +22,16 @@ ...@@ -22,11 +22,16 @@
// Diff line // Diff line
.line_holder { .line_holder {
.diff-line-num.new, .line_content.new { .diff-line-num.new, .line_content.new {
@include diff_background(51, 255, 51, #808080); @include diff_background(rgba(51, 255, 51, 0.1), rgba(51, 255, 51, 0.2), #808080);
} }
.diff-line-num.old, .line_content.old { .diff-line-num.old, .line_content.old {
@include diff_background(255, 51, 51, #808080); @include diff_background(rgba(255, 51, 51, 0.2), rgba(255, 51, 51, 0.2), #808080);
}
.line_content.match {
color: rgba(255, 255, 255, 0.3);
background: rgba(255, 255, 255, 0.1);
} }
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
} }
.diff-line-num, .diff-line-num a { .diff-line-num, .diff-line-num a {
color: #f8f8f2; color: rgba(255, 255, 255, 0.3);
} }
// Code itself // Code itself
...@@ -22,11 +22,16 @@ ...@@ -22,11 +22,16 @@
// Diff line // Diff line
.line_holder { .line_holder {
.diff-line-num.new, .line_content.new { .diff-line-num.new, .line_content.new {
@include diff_background(156, 175, 183, #808080); @include diff_background(rgba(166, 226, 46, 0.2), rgba(166, 226, 46, 0.3), #808080);
} }
.diff-line-num.old, .line_content.old { .diff-line-num.old, .line_content.old {
@include diff_background(254, 147, 140, #808080); @include diff_background(rgba(254, 147, 140, 0.2), rgba(254, 147, 140, 0.3), #808080);
}
.line_content.match {
color: rgba(255, 255, 255, 0.3);
background: rgba(255, 255, 255, 0.1);
} }
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
} }
.diff-line-num, .diff-line-num a { .diff-line-num, .diff-line-num a {
color: #93a1a1; color: rgba(255, 255, 255, 0.3);
} }
// Code itself // Code itself
...@@ -22,11 +22,16 @@ ...@@ -22,11 +22,16 @@
// Diff line // Diff line
.line_holder { .line_holder {
.diff-line-num.new, .line_content.new { .diff-line-num.new, .line_content.new {
@include diff_background(255, 255, 255, #808080); @include diff_background(rgba(133, 153, 0, 0.2), rgba(133, 153, 0, 0.3), #808080);
} }
.diff-line-num.old, .line_content.old { .diff-line-num.old, .line_content.old {
@include diff_background(255, 51, 51, #808080); @include diff_background(rgba(220, 50, 47, 0.2), rgba(220, 50, 47, 0.3), #808080);
}
.line_content.match {
color: rgba(255, 255, 255, 0.3);
background: rgba(255, 255, 255, 0.1);
} }
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
} }
.diff-line-num, .diff-line-num a { .diff-line-num, .diff-line-num a {
color: #586e75; color: rgba(0, 0, 0, 0.3);
} }
// Code itself // Code itself
...@@ -22,11 +22,16 @@ ...@@ -22,11 +22,16 @@
// Diff line // Diff line
.line_holder { .line_holder {
.diff-line-num.new, .line_content.new { .diff-line-num.new, .line_content.new {
@include diff_background(92, 164, 169, #FAF3DD); @include diff_background(rgba(133, 153, 0, 0.2), rgba(133, 153, 0, 0.3), #FAF3DD);
} }
.diff-line-num.old, .line_content.old { .diff-line-num.old, .line_content.old {
@include diff_background(237, 106, 90, #FAF3DD); @include diff_background(rgba(220, 50, 47, 0.2), rgba(220, 50, 47, 0.3), #FAF3DD);
}
.line_content.match {
color: rgba(0, 0, 0, 0.3);
background: rgba(255, 255, 255, 0.4);
} }
} }
......
...@@ -353,17 +353,14 @@ ...@@ -353,17 +353,14 @@
} }
} }
@mixin diff_background($r, $g, $b, $custom-border) { @mixin diff_background($background, $idiff, $border) {
/* Fallback for web browsers that doesn't support RGBa */ background: $background;
background: rgb($r, $g, $b);
/* RGBa with 0.3 opacity */
background: rgba($r, $g, $b, 0.3);
&.diff-line-num { &.line_content span.idiff {
border-right-color: $custom-border !important; background: $idiff;
} }
&.line_content span.idiff { &.diff-line-num {
background: rgb($r, $g, $b); border-color: $border;
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment