Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
21958a39
Commit
21958a39
authored
Jan 07, 2016
by
Rubén Dávila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some styling for syntax highlighting themes. #3945
parent
1494bb3f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
78 additions
and
2 deletions
+78
-2
app/assets/stylesheets/highlight/dark.scss
app/assets/stylesheets/highlight/dark.scss
+14
-0
app/assets/stylesheets/highlight/monokai.scss
app/assets/stylesheets/highlight/monokai.scss
+18
-0
app/assets/stylesheets/highlight/solarized_dark.scss
app/assets/stylesheets/highlight/solarized_dark.scss
+14
-0
app/assets/stylesheets/highlight/solarized_light.scss
app/assets/stylesheets/highlight/solarized_light.scss
+15
-0
app/assets/stylesheets/pages/diff.scss
app/assets/stylesheets/pages/diff.scss
+15
-0
app/views/projects/diffs/_parallel_view.html.haml
app/views/projects/diffs/_parallel_view.html.haml
+1
-1
app/views/projects/diffs/_text_file.html.haml
app/views/projects/diffs/_text_file.html.haml
+1
-1
No files found.
app/assets/stylesheets/highlight/dark.scss
View file @
21958a39
...
...
@@ -90,4 +90,18 @@
.vg
{
color
:
#cc6666
}
/* Name.Variable.Global */
.vi
{
color
:
#cc6666
}
/* Name.Variable.Instance */
.il
{
color
:
#de935f
}
/* Literal.Number.Integer.Long */
.line_holder
{
&
.new
.old_line
,
&
.new
.new_line
,
&
.new
.line_content
{
@include
diff_background
(
255
,
255
,
255
,
#808080
);
}
&
.old
.old_line
,
&
.old
.new_line
,
&
.old
.line_content
{
@include
diff_background
(
255
,
51
,
51
,
#808080
);
}
}
}
app/assets/stylesheets/highlight/monokai.scss
View file @
21958a39
...
...
@@ -90,4 +90,22 @@
.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
);
}
}
}
app/assets/stylesheets/highlight/solarized_dark.scss
View file @
21958a39
...
...
@@ -111,4 +111,18 @@
.vg
{
color
:
#268bd2
}
/* Name.Variable.Global */
.vi
{
color
:
#268bd2
}
/* Name.Variable.Instance */
.il
{
color
:
#2aa198
}
/* Literal.Number.Integer.Long */
.line_holder
{
&
.new
.old_line
,
&
.new
.new_line
,
&
.new
.line_content
{
@include
diff_background
(
255
,
255
,
255
,
#808080
);
}
&
.old
.old_line
,
&
.old
.new_line
,
&
.old
.line_content
{
@include
diff_background
(
255
,
51
,
51
,
#808080
);
}
}
}
app/assets/stylesheets/highlight/solarized_light.scss
View file @
21958a39
...
...
@@ -111,4 +111,19 @@
.vg
{
color
:
#268bd2
}
/* Name.Variable.Global */
.vi
{
color
:
#268bd2
}
/* Name.Variable.Instance */
.il
{
color
:
#2aa198
}
/* Literal.Number.Integer.Long */
.line_holder
{
&
.new
.old_line
,
&
.new
.new_line
,
&
.new
.line_content
{
@include
diff_background
(
92
,
164
,
169
,
#FAF3DD
);
}
&
.old
.old_line
,
&
.old
.new_line
,
&
.old
.line_content
{
@include
diff_background
(
237
,
106
,
90
,
#FAF3DD
);
}
}
}
app/assets/stylesheets/pages/diff.scss
View file @
21958a39
...
...
@@ -402,3 +402,18 @@
right
:
15px
;
}
}
@mixin
diff_background
(
$r
,
$g
,
$b
,
$custom-border
)
{
/* Fallback for web browsers that doesn't support RGBa */
background
:
rgb
(
$r
,
$g
,
$b
);
/* RGBa with 0.3 opacity */
background
:
rgba
(
$r
,
$g
,
$b
,
0
.3
);
&
.new_line
,
&
.old_line
{
border-right-color
:
$custom-border
!
important
;
}
&
.line_content
span
.idiff
{
background
:
rgb
(
$r
,
$g
,
$b
);
}
}
app/views/projects/diffs/_parallel_view.html.haml
View file @
21958a39
/ Side-by-side diff view
%div
.text-file.diff-wrap-lines.code.file-content.js-syntax-highlight
.white
%div
.text-file.diff-wrap-lines.code.file-content.js-syntax-highlight
%table
-
parallel_diff
(
diff_file
,
index
).
each
do
|
line
|
-
type_left
=
line
[
0
]
...
...
app/views/projects/diffs/_text_file.html.haml
View file @
21958a39
...
...
@@ -3,7 +3,7 @@
.suppressed-container
%a
.show-suppressed-diff.js-show-suppressed-diff
Changes suppressed. Click to show.
%table
.text-file.code.js-syntax-highlight
.white
{
class:
too_big
?
'hide'
:
''
}
%table
.text-file.code.js-syntax-highlight
{
class:
too_big
?
'hide'
:
''
}
-
last_line
=
0
-
diff_file
.
highlighted_diff_lines
.
each_with_index
do
|
line
,
index
|
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment