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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
6f00586e
Commit
6f00586e
authored
Aug 20, 2019
by
Samantha Ming
Committed by
Mike Greiling
Aug 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add syntax highlighting for line expansion
- dark - white - monokai - none - solarized-dark - solarized-light
parent
45311808
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
42 additions
and
21 deletions
+42
-21
app/assets/javascripts/diffs/components/diff_expansion_cell.vue
...sets/javascripts/diffs/components/diff_expansion_cell.vue
+3
-3
app/assets/stylesheets/highlight/common.scss
app/assets/stylesheets/highlight/common.scss
+13
-0
app/assets/stylesheets/highlight/themes/dark.scss
app/assets/stylesheets/highlight/themes/dark.scss
+4
-0
app/assets/stylesheets/highlight/themes/monokai.scss
app/assets/stylesheets/highlight/themes/monokai.scss
+4
-0
app/assets/stylesheets/highlight/themes/none.scss
app/assets/stylesheets/highlight/themes/none.scss
+4
-1
app/assets/stylesheets/highlight/themes/solarized-dark.scss
app/assets/stylesheets/highlight/themes/solarized-dark.scss
+4
-0
app/assets/stylesheets/highlight/themes/solarized-light.scss
app/assets/stylesheets/highlight/themes/solarized-light.scss
+4
-0
app/assets/stylesheets/highlight/white_base.scss
app/assets/stylesheets/highlight/white_base.scss
+1
-17
changelogs/unreleased/66066-dark-theme-style-for-expansion-on-mr-diffs.yml
...ased/66066-dark-theme-style-for-expansion-on-mr-diffs.yml
+5
-0
No files found.
app/assets/javascripts/diffs/components/diff_expansion_cell.vue
View file @
6f00586e
...
@@ -212,12 +212,12 @@ export default {
...
@@ -212,12 +212,12 @@ export default {
</
script
>
</
script
>
<
template
>
<
template
>
<td
:colspan=
"colspan"
>
<td
:colspan=
"colspan"
class=
"text-center"
>
<div
class=
"content js-line-expansion-content"
>
<div
class=
"content js-line-expansion-content"
>
<a
<a
v-if=
"canExpandUp"
v-if=
"canExpandUp"
v-tooltip
v-tooltip
class=
"cursor-pointer js-unfold unfold-icon"
class=
"cursor-pointer js-unfold unfold-icon
d-inline-block pt-2 pb-2
"
data-placement=
"top"
data-placement=
"top"
data-container=
"body"
data-container=
"body"
:title=
"__('Expand up')"
:title=
"__('Expand up')"
...
@@ -231,7 +231,7 @@ export default {
...
@@ -231,7 +231,7 @@ export default {
<a
<a
v-if=
"canExpandDown"
v-if=
"canExpandDown"
v-tooltip
v-tooltip
class=
"cursor-pointer js-unfold-down has-tooltip unfold-icon"
class=
"cursor-pointer js-unfold-down has-tooltip unfold-icon
d-inline-block pt-2 pb-2
"
data-placement=
"top"
data-placement=
"top"
data-container=
"body"
data-container=
"body"
:title=
"__('Expand down')"
:title=
"__('Expand down')"
...
...
app/assets/stylesheets/highlight/common.scss
View file @
6f00586e
...
@@ -16,3 +16,16 @@
...
@@ -16,3 +16,16 @@
color
:
$dark-diff-match-bg
;
color
:
$dark-diff-match-bg
;
background
:
$dark-diff-match-color
;
background
:
$dark-diff-match-color
;
}
}
@mixin
diff-expansion
(
$background
,
$border
,
$link
)
{
background-color
:
$background
;
td
{
border-top
:
1px
solid
$border
;
border-bottom
:
1px
solid
$border
;
}
a
{
color
:
$link
;
}
}
app/assets/stylesheets/highlight/themes/dark.scss
View file @
6f00586e
...
@@ -111,6 +111,10 @@ $dark-il: #de935f;
...
@@ -111,6 +111,10 @@ $dark-il: #de935f;
color
:
$dark-line-color
;
color
:
$dark-line-color
;
}
}
.line_expansion
{
@include
diff-expansion
(
$dark-main-bg
,
$dark-border
,
$dark-na
);
}
// Diff line
// Diff line
.line_holder
{
.line_holder
{
&
.match
.line_content
,
&
.match
.line_content
,
...
...
app/assets/stylesheets/highlight/themes/monokai.scss
View file @
6f00586e
...
@@ -111,6 +111,10 @@ $monokai-gi: #a6e22e;
...
@@ -111,6 +111,10 @@ $monokai-gi: #a6e22e;
color
:
$monokai-text-color
;
color
:
$monokai-text-color
;
}
}
.line_expansion
{
@include
diff-expansion
(
$monokai-bg
,
$monokai-border
,
$monokai-k
);
}
// Diff line
// Diff line
.line_holder
{
.line_holder
{
&
.match
.line_content
,
&
.match
.line_content
,
...
...
app/assets/stylesheets/highlight/themes/none.scss
View file @
6f00586e
...
@@ -34,8 +34,11 @@
...
@@ -34,8 +34,11 @@
color
:
$gl-text-color
;
color
:
$gl-text-color
;
}
}
// Diff line
.line_expansion
{
@include
diff-expansion
(
$gray-light
,
$white-normal
,
$gl-text-color
);
}
// Diff line
$none-over-bg
:
#ded7fc
;
$none-over-bg
:
#ded7fc
;
$none-expanded-border
:
#e0e0e0
;
$none-expanded-border
:
#e0e0e0
;
$none-expanded-bg
:
#e0e0e0
;
$none-expanded-bg
:
#e0e0e0
;
...
...
app/assets/stylesheets/highlight/themes/solarized-dark.scss
View file @
6f00586e
...
@@ -115,6 +115,10 @@ $solarized-dark-il: #2aa198;
...
@@ -115,6 +115,10 @@ $solarized-dark-il: #2aa198;
color
:
$solarized-dark-pre-color
;
color
:
$solarized-dark-pre-color
;
}
}
.line_expansion
{
@include
diff-expansion
(
$solarized-dark-line-bg
,
$solarized-dark-border
,
$solarized-dark-kd
);
}
// Diff line
// Diff line
.line_holder
{
.line_holder
{
&
.match
.line_content
,
&
.match
.line_content
,
...
...
app/assets/stylesheets/highlight/themes/solarized-light.scss
View file @
6f00586e
...
@@ -122,6 +122,10 @@ $solarized-light-il: #2aa198;
...
@@ -122,6 +122,10 @@ $solarized-light-il: #2aa198;
color
:
$solarized-light-pre-color
;
color
:
$solarized-light-pre-color
;
}
}
.line_expansion
{
@include
diff-expansion
(
$solarized-light-line-bg
,
$solarized-light-border
,
$solarized-light-kd
);
}
// Diff line
// Diff line
.line_holder
{
.line_holder
{
&
.match
.line_content
,
&
.match
.line_content
,
...
...
app/assets/stylesheets/highlight/white_base.scss
View file @
6f00586e
...
@@ -101,24 +101,8 @@ pre.code,
...
@@ -101,24 +101,8 @@ pre.code,
color
:
$white-code-color
;
color
:
$white-code-color
;
}
}
// Expansion line
.line_expansion
{
.line_expansion
{
background-color
:
$gray-light
;
@include
diff-expansion
(
$gray-light
,
$border-color
,
$blue-600
);
td
{
border-top
:
1px
solid
$border-color
;
border-bottom
:
1px
solid
$border-color
;
text-align
:
center
;
}
a
{
color
:
$blue-600
;
}
.unfold-icon
{
display
:
inline-block
;
padding
:
8px
0
;
}
}
}
// Diff line
// Diff line
...
...
changelogs/unreleased/66066-dark-theme-style-for-expansion-on-mr-diffs.yml
0 → 100644
View file @
6f00586e
---
title
:
Add syntax highlighting for line expansion
merge_request
:
31821
author
:
type
:
fixed
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