summaryrefslogtreecommitdiff
path: root/app/assets
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/stylesheets/framework/common.scss8
-rw-r--r--app/assets/stylesheets/framework/files.scss21
-rw-r--r--app/assets/stylesheets/highlight/dark.scss49
-rw-r--r--app/assets/stylesheets/highlight/monokai.scss49
-rw-r--r--app/assets/stylesheets/highlight/solarized_dark.scss49
-rw-r--r--app/assets/stylesheets/highlight/solarized_light.scss50
-rw-r--r--app/assets/stylesheets/highlight/white.scss60
-rw-r--r--app/assets/stylesheets/pages/diff.scss47
-rw-r--r--app/assets/stylesheets/pages/note_form.scss12
-rw-r--r--app/assets/stylesheets/pages/notes.scss3
10 files changed, 151 insertions, 197 deletions
diff --git a/app/assets/stylesheets/framework/common.scss b/app/assets/stylesheets/framework/common.scss
index 585a9d83913..9bc814cfd2d 100644
--- a/app/assets/stylesheets/framework/common.scss
+++ b/app/assets/stylesheets/framework/common.scss
@@ -120,14 +120,6 @@ span.update-author {
display: inline;
}
-.line_holder {
- &:hover {
- td {
- background: #FFFFCF !important;
- }
- }
-}
-
p.time {
color: #999;
font-size: 90%;
diff --git a/app/assets/stylesheets/framework/files.scss b/app/assets/stylesheets/framework/files.scss
index 6ee104ee31a..a4791cf6b34 100644
--- a/app/assets/stylesheets/framework/files.scss
+++ b/app/assets/stylesheets/framework/files.scss
@@ -92,15 +92,6 @@
&:last-child {
border-right: none;
}
- background: #fff;
- }
- .lines {
- pre {
- padding: 0;
- margin: 0;
- background: none;
- border: none;
- }
}
img.avatar {
border: 0 none;
@@ -116,18 +107,18 @@
color: #888;
}
}
- td.blame-numbers {
- pre {
- color: #AAA;
- white-space: pre;
- }
- background: #f1f1f1;
+ td.line-numbers {
+ float: none;
border-left: 1px solid #DDD;
}
td.lines {
+ padding: 0;
code {
font-family: $monospace_font;
}
+ pre {
+ margin: 0;
+ }
}
}
diff --git a/app/assets/stylesheets/highlight/dark.scss b/app/assets/stylesheets/highlight/dark.scss
index 8201735beb5..3ba2cc94ad2 100644
--- a/app/assets/stylesheets/highlight/dark.scss
+++ b/app/assets/stylesheets/highlight/dark.scss
@@ -1,20 +1,35 @@
/* https://github.com/MozMorris/tomorrow-pygments */
.code.dark {
+ // Line numbers
+ .line-numbers, .diff-line-num {
+ background-color: #1d1f21;
+ }
- background-color: #1d1f21 !important;
- color: #c5c8c6 !important;
-
- pre.highlight,
- .line-numbers,
- .line-numbers a {
- background-color: #1d1f21 !important;
- color: #c5c8c6 !important;
+ .diff-line-num, .diff-line-num a {
+ color: rgba(255, 255, 255, 0.3);
}
+ // Code itself
pre.code {
border-left: 1px solid #666;
}
+ &, pre.code, .line_holder .line_content {
+ background-color: #1d1f21;
+ color: #c5c8c6;
+ }
+
+ // Diff line
+ .line_holder {
+ .diff-line-num.new, .line_content.new {
+ @include diff_background(51, 255, 51, #808080);
+ }
+
+ .diff-line-num.old, .line_content.old {
+ @include diff_background(255, 51, 51, #808080);
+ }
+ }
+
// highlight line via anchor
pre .hll {
background-color: #557 !important;
@@ -90,22 +105,4 @@
.vg { color: #cc6666 } /* Name.Variable.Global */
.vi { color: #cc6666 } /* Name.Variable.Instance */
.il { color: #de935f } /* Literal.Number.Integer.Long */
-
- .line_holder {
- &.parallel .new.new_line,
- &.parallel .new.line_content,
- &.new .old_line,
- &.new .new_line,
- &.new .line_content {
- @include diff_background(255, 255, 255, #808080);
- }
-
- &.parallel .old.old_line,
- &.parallel .old.line_content,
- &.old .old_line,
- &.old .new_line,
- &.old .line_content {
- @include diff_background(255, 51, 51, #808080);
- }
- }
}
diff --git a/app/assets/stylesheets/highlight/monokai.scss b/app/assets/stylesheets/highlight/monokai.scss
index cc03ed6ae45..b47aef73d2b 100644
--- a/app/assets/stylesheets/highlight/monokai.scss
+++ b/app/assets/stylesheets/highlight/monokai.scss
@@ -1,20 +1,35 @@
/* https://github.com/richleland/pygments-css/blob/master/monokai.css */
.code.monokai {
+ // Line numbers
+ .line-numbers, .diff-line-num {
+ background-color: #272822;
+ }
- background-color: #272822 !important;
- color: #f8f8f2 !important;
-
- pre.highlight,
- .line-numbers,
- .line-numbers a {
- background-color :#272822 !important;
- color: #f8f8f2 !important;
+ .diff-line-num, .diff-line-num a {
+ color: #f8f8f2;
}
+ // Code itself
pre.code {
border-left: 1px solid #555;
}
+ &, pre.code, .line_holder .line_content {
+ background-color: #272822;
+ color: #f8f8f2;
+ }
+
+ // Diff line
+ .line_holder {
+ .diff-line-num.new, .line_content.new {
+ @include diff_background(156, 175, 183, #808080);
+ }
+
+ .diff-line-num.old, .line_content.old {
+ @include diff_background(254, 147, 140, #808080);
+ }
+ }
+
// highlight line via anchor
pre .hll {
background-color: #49483e !important;
@@ -90,22 +105,4 @@
.gu { color: #75715e; } /* Generic.Subheading & Diff Unified/Comment? */
.gd { color: #f92672; } /* Generic.Deleted & Diff Deleted */
.gi { color: #a6e22e; } /* Generic.Inserted & Diff Inserted */
-
- .line_holder {
- &.parallel .new.new_line,
- &.parallel .new.line_content,
- &.new .old_line,
- &.new .new_line,
- &.new .line_content {
- @include diff_background(156, 175, 183, #808080);
- }
-
- &.parallel .old.old_line,
- &.parallel .old.line_content,
- &.old .old_line,
- &.old .new_line,
- &.old .line_content {
- @include diff_background(254, 147, 140, #808080);
- }
- }
}
diff --git a/app/assets/stylesheets/highlight/solarized_dark.scss b/app/assets/stylesheets/highlight/solarized_dark.scss
index fdfac6cd249..0aab580bd3c 100644
--- a/app/assets/stylesheets/highlight/solarized_dark.scss
+++ b/app/assets/stylesheets/highlight/solarized_dark.scss
@@ -1,20 +1,35 @@
/* https://gist.github.com/qguv/7936275 */
.code.solarized-dark {
+ // Line numbers
+ .line-numbers, .diff-line-num {
+ background-color: #002b36;
+ }
- background-color: #002b36 !important;
- color: #93a1a1 !important;
-
- pre.highlight,
- .line-numbers,
- .line-numbers a {
- background-color: #002b36 !important;
- color: #93a1a1 !important;
+ .diff-line-num, .diff-line-num a {
+ color: #93a1a1;
}
+ // Code itself
pre.code {
border-left: 1px solid #113b46;
}
+ &, pre.code, .line_holder .line_content {
+ background-color: #002b36;
+ color: #93a1a1;
+ }
+
+ // Diff line
+ .line_holder {
+ .diff-line-num.new, .line_content.new {
+ @include diff_background(255, 255, 255, #808080);
+ }
+
+ .diff-line-num.old, .line_content.old {
+ @include diff_background(255, 51, 51, #808080);
+ }
+ }
+
// highlight line via anchor
pre .hll {
background-color: #174652 !important;
@@ -111,22 +126,4 @@
.vg { color: #268bd2 } /* Name.Variable.Global */
.vi { color: #268bd2 } /* Name.Variable.Instance */
.il { color: #2aa198 } /* Literal.Number.Integer.Long */
-
- .line_holder {
- &.parallel .new.new_line,
- &.parallel .new.line_content,
- &.new .old_line,
- &.new .new_line,
- &.new .line_content {
- @include diff_background(255, 255, 255, #808080);
- }
-
- &.parallel .old.old_line,
- &.parallel .old.line_content,
- &.old .old_line,
- &.old .new_line,
- &.old .line_content {
- @include diff_background(255, 51, 51, #808080);
- }
- }
}
diff --git a/app/assets/stylesheets/highlight/solarized_light.scss b/app/assets/stylesheets/highlight/solarized_light.scss
index f9788951aa8..3aaadcd0f96 100644
--- a/app/assets/stylesheets/highlight/solarized_light.scss
+++ b/app/assets/stylesheets/highlight/solarized_light.scss
@@ -1,20 +1,35 @@
/* https://gist.github.com/qguv/7936275 */
.code.solarized-light {
+ // Line numbers
+ .line-numbers, .diff-line-num {
+ background-color: #fdf6e3;
+ }
- background-color: #fdf6e3 !important;
- color: #586e75 !important;
-
- pre.highlight,
- .line-numbers,
- .line-numbers a {
- background-color: #fdf6e3 !important;
- color: #586e75 !important;
+ .diff-line-num, .diff-line-num a {
+ color: #586e75;
}
+ // Code itself
pre.code {
border-left: 1px solid #c5d0d4;
}
+ &, pre.code, .line_holder .line_content {
+ background-color: #fdf6e3;
+ color: #586e75;
+ }
+
+ // Diff line
+ .line_holder {
+ .diff-line-num.new, .line_content.new {
+ @include diff_background(92, 164, 169, #FAF3DD);
+ }
+
+ .diff-line-num.old, .line_content.old {
+ @include diff_background(237, 106, 90, #FAF3DD);
+ }
+ }
+
// highlight line via anchor
pre .hll {
background-color: #ddd8c5 !important;
@@ -111,23 +126,4 @@
.vg { color: #268bd2 } /* Name.Variable.Global */
.vi { color: #268bd2 } /* Name.Variable.Instance */
.il { color: #2aa198 } /* Literal.Number.Integer.Long */
-
-
- .line_holder {
- &.parallel .new.new_line,
- &.parallel .new.line_content,
- &.new .old_line,
- &.new .new_line,
- &.new .line_content {
- @include diff_background(92, 164, 169, #FAF3DD);
- }
-
- &.parallel .old.old_line,
- &.parallel .old.line_content,
- &.old .old_line,
- &.old .new_line,
- &.old .line_content {
- @include diff_background(237, 106, 90, #FAF3DD);
- }
- }
}
diff --git a/app/assets/stylesheets/highlight/white.scss b/app/assets/stylesheets/highlight/white.scss
index e2626da7871..8a932e6540e 100644
--- a/app/assets/stylesheets/highlight/white.scss
+++ b/app/assets/stylesheets/highlight/white.scss
@@ -1,20 +1,60 @@
/* https://github.com/aahan/pygments-github-style */
.code.white {
+ // Line numbers
+ .line-numbers, .diff-line-num {
+ background-color: $background-color;
+ }
- background-color: #f8fafc !important;
- color: #5b6169 !important;
-
- pre.highlight,
- .line-numbers,
- .line-numbers a {
- background-color: $background-color !important;
- color: $gl-gray !important;
+ .diff-line-num, .diff-line-num a {
+ color: rgba(0, 0, 0, 0.3);
}
+ // Code itself
pre.code {
border-left: 1px solid $border-color;
- background-color: #fff !important;
- color: #333 !important;
+ }
+
+ &, pre.code, .line_holder .line_content {
+ background-color: #fff;
+ color: #333;
+ }
+
+ // Diff line
+ .line_holder {
+ .diff-line-num {
+ &.old {
+ background: #ffdddd;
+ border-color: #f1c0c0;
+ }
+
+ &.new {
+ background: #dbffdb;
+ border-color: #c1e9c1;
+ }
+ }
+
+ .line_content {
+ &.old {
+ background: #ffecec;
+
+ span.idiff {
+ background-color: #f8cbcb;
+ }
+ }
+
+ &.new {
+ background: #eaffea;
+
+ span.idiff {
+ background-color: #a6f3a6;
+ }
+ }
+
+ &.match {
+ color: rgba(0, 0, 0, 0.3);
+ background: #fafafa;
+ }
+ }
}
// highlight line via anchor
diff --git a/app/assets/stylesheets/pages/diff.scss b/app/assets/stylesheets/pages/diff.scss
index 0b79aa172a4..06d0ece1c66 100644
--- a/app/assets/stylesheets/pages/diff.scss
+++ b/app/assets/stylesheets/pages/diff.scss
@@ -32,16 +32,6 @@
background: #FFF;
color: #333;
- .old {
- span.idiff {
- background-color: #f8cbcb;
- }
- }
- .new {
- span.idiff {
- background-color: #a6f3a6;
- }
- }
.unfold {
cursor: pointer;
}
@@ -76,7 +66,7 @@
}
tr.line_holder.parallel {
- .old_line, .new_line, .diff_line {
+ .old_line, .new_line {
min-width: 50px;
}
@@ -85,7 +75,7 @@
}
}
- .old_line, .new_line, .diff_line {
+ .old_line, .new_line {
margin: 0px;
padding: 0px;
border: none;
@@ -107,43 +97,12 @@
text-decoration: underline;
}
}
- &.new {
- background: #CFD;
- }
- &.old {
- background: #FDD;
- }
- }
- .diff_line {
- padding: 0;
- }
- .line_holder {
- &.old .old_line,
- &.old .new_line {
- background: #ffdddd;
- border-color: #f1c0c0;
- }
- &.new .old_line,
- &.new .new_line {
- background: #dbffdb;
- border-color: #c1e9c1;
- }
}
.line_content {
display: block;
margin: 0px;
padding: 0px 0.5em;
border: none;
- &.new {
- background: #eaffea;
- }
- &.old {
- background: #ffecec;
- }
- &.matched {
- color: $border-color;
- background: #fafafa;
- }
&.parallel {
display: table-cell;
}
@@ -400,7 +359,7 @@
/* RGBa with 0.3 opacity */
background: rgba($r, $g, $b, 0.3);
- &.new_line, &.old_line {
+ &.diff-line-num {
border-right-color: $custom-border !important;
}
diff --git a/app/assets/stylesheets/pages/note_form.scss b/app/assets/stylesheets/pages/note_form.scss
index 2c9a42f9892..32ba1676333 100644
--- a/app/assets/stylesheets/pages/note_form.scss
+++ b/app/assets/stylesheets/pages/note_form.scss
@@ -10,18 +10,6 @@
margin: 10px $gl-padding;
}
.diff-file .diff-content {
- tr.line_holder:hover {
- &> td.line_content {
- background: $hover !important;
- border-color: darken($hover, 10%) !important;
- }
- &> td.new_line,
- &> td.old_line {
- background: darken($hover, 4%) !important;
- border-color: darken($hover, 10%) !important;
- }
- }
-
tr.line_holder:hover > td .line_note_link {
opacity: 1.0;
filter: alpha(opacity=100);
diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss
index 72b0ed29a69..f6343e6bb1e 100644
--- a/app/assets/stylesheets/pages/notes.scss
+++ b/app/assets/stylesheets/pages/notes.scss
@@ -242,11 +242,8 @@ ul.notes {
// "show" the icon also if we just hover somewhere over the line
&:hover > td {
- background: $hover !important;
-
.add-diff-note {
@include show-add-diff-note;
}
}
}
-