diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-17 18:09:44 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-17 18:09:44 +0000 |
commit | 2c156e3c7bbade01c36eee18327f1ced6eebea79 (patch) | |
tree | 115fa8dbf6bc05037378b380311d31acb805f54c /app/assets/stylesheets/highlight | |
parent | 8e129497b2565b8c595ef4f806d9a9595ca654e5 (diff) | |
download | gitlab-ce-2c156e3c7bbade01c36eee18327f1ced6eebea79.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/stylesheets/highlight')
7 files changed, 85 insertions, 0 deletions
diff --git a/app/assets/stylesheets/highlight/common.scss b/app/assets/stylesheets/highlight/common.scss index bdeac7e97c0..31075b09b83 100644 --- a/app/assets/stylesheets/highlight/common.scss +++ b/app/assets/stylesheets/highlight/common.scss @@ -29,3 +29,15 @@ color: $link; } } + +@mixin line-coverage-border-color($coverage, $no-coverage) { + transition: border-left 0.1s ease-out; + + &.coverage { + border-left: 3px solid $coverage; + } + + &.no-coverage { + border-left: 3px solid $no-coverage; + } +} diff --git a/app/assets/stylesheets/highlight/themes/dark.scss b/app/assets/stylesheets/highlight/themes/dark.scss index cbce0ba3f1e..5ab762a5104 100644 --- a/app/assets/stylesheets/highlight/themes/dark.scss +++ b/app/assets/stylesheets/highlight/themes/dark.scss @@ -24,6 +24,8 @@ $dark-pre-hll-bg: #373b41; $dark-hll-bg: #373b41; $dark-over-bg: #9f9ab5; $dark-expanded-bg: #3e3e3e; +$dark-coverage: #b5bd68; +$dark-no-coverage: #de935f; $dark-c: #969896; $dark-err: #c66; $dark-k: #b294bb; @@ -124,12 +126,18 @@ $dark-il: #de935f; } td.diff-line-num.hll:not(.empty-cell), + td.line-coverage.hll:not(.empty-cell), td.line_content.hll:not(.empty-cell) { background-color: $dark-diff-not-empty-bg; border-color: darken($dark-diff-not-empty-bg, 15%); } + .line-coverage { + @include line-coverage-border-color($dark-coverage, $dark-no-coverage); + } + .diff-line-num.new, + .line-coverage.new, .line_content.new { @include diff-background($dark-new-bg, $dark-new-idiff, $dark-border); @@ -140,6 +148,7 @@ $dark-il: #de935f; } .diff-line-num.old, + .line-coverage.old, .line_content.old { @include diff-background($dark-old-bg, $dark-old-idiff, $dark-border); @@ -168,6 +177,7 @@ $dark-il: #de935f; &:not(.diff-expanded) + .diff-expanded, &.diff-expanded + .line_holder:not(.diff-expanded) { > .diff-line-num, + > .line-coverage, > .line_content { border-top: 1px solid $black; } @@ -175,6 +185,7 @@ $dark-il: #de935f; &.diff-expanded { > .diff-line-num, + > .line-coverage, > .line_content { background: $dark-expanded-bg; border-color: $dark-expanded-bg; diff --git a/app/assets/stylesheets/highlight/themes/monokai.scss b/app/assets/stylesheets/highlight/themes/monokai.scss index 1b61ffa37e3..348ef69cc4f 100644 --- a/app/assets/stylesheets/highlight/themes/monokai.scss +++ b/app/assets/stylesheets/highlight/themes/monokai.scss @@ -17,6 +17,8 @@ $monokai-diff-border: #808080; $monokai-highlight-bg: #ffe792; $monokai-over-bg: #9f9ab5; $monokai-expanded-bg: #3e3e3e; +$monokai-coverage: #a6e22e; +$monokai-no-coverage: #fd971f; $monokai-new-bg: rgba(166, 226, 46, 0.1); $monokai-new-idiff: rgba(166, 226, 46, 0.15); @@ -124,12 +126,18 @@ $monokai-gi: #a6e22e; } td.diff-line-num.hll:not(.empty-cell), + td.line-coverage.hll:not(.empty-cell), td.line_content.hll:not(.empty-cell) { background-color: $monokai-line-empty-bg; border-color: $monokai-line-empty-border; } + .line-coverage { + @include line-coverage-border-color($monokai-coverage, $monokai-no-coverage); + } + .diff-line-num.new, + .line-coverage.new, .line_content.new { @include diff-background($monokai-new-bg, $monokai-new-idiff, $monokai-diff-border); @@ -140,6 +148,7 @@ $monokai-gi: #a6e22e; } .diff-line-num.old, + .line-coverage.old, .line_content.old { @include diff-background($monokai-old-bg, $monokai-old-idiff, $monokai-diff-border); @@ -168,6 +177,7 @@ $monokai-gi: #a6e22e; &:not(.diff-expanded) + .diff-expanded, &.diff-expanded + .line_holder:not(.diff-expanded) { > .diff-line-num, + > .line-coverage, > .line_content { border-top: 1px solid $black; } @@ -175,6 +185,7 @@ $monokai-gi: #a6e22e; &.diff-expanded { > .diff-line-num, + > .line-coverage, > .line_content { background: $monokai-expanded-bg; border-color: $monokai-expanded-bg; diff --git a/app/assets/stylesheets/highlight/themes/none.scss b/app/assets/stylesheets/highlight/themes/none.scss index a7ede266fb5..c8ac3aa8305 100644 --- a/app/assets/stylesheets/highlight/themes/none.scss +++ b/app/assets/stylesheets/highlight/themes/none.scss @@ -51,6 +51,15 @@ @include match-line; } + .line-coverage { + @include line-coverage-border-color($green-500, $orange-500); + + &.old, + &.new { + background-color: $white-normal; + } + } + .diff-line-num { &.old { a { @@ -83,6 +92,7 @@ &:not(.diff-expanded) + .diff-expanded, &.diff-expanded + .line_holder:not(.diff-expanded) { > .diff-line-num, + > .line-coverage, > .line_content { border-top: 1px solid $none-expanded-border; } @@ -90,6 +100,7 @@ &.diff-expanded { > .diff-line-num, + > .line-coverage, > .line_content { background: $none-expanded-bg; border-color: $none-expanded-bg; diff --git a/app/assets/stylesheets/highlight/themes/solarized-dark.scss b/app/assets/stylesheets/highlight/themes/solarized-dark.scss index 6569f3abc8b..f5b36480f18 100644 --- a/app/assets/stylesheets/highlight/themes/solarized-dark.scss +++ b/app/assets/stylesheets/highlight/themes/solarized-dark.scss @@ -21,6 +21,8 @@ $solarized-dark-highlight: #094554; $solarized-dark-hll-bg: #174652; $solarized-dark-over-bg: #9f9ab5; $solarized-dark-expanded-bg: #010d10; +$solarized-dark-coverage: #859900; +$solarized-dark-no-coverage: #cb4b16; $solarized-dark-c: #586e75; $solarized-dark-err: #93a1a1; $solarized-dark-g: #93a1a1; @@ -128,12 +130,18 @@ $solarized-dark-il: #2aa198; } td.diff-line-num.hll:not(.empty-cell), + td.line-coverage.hll:not(.empty-cell), td.line_content.hll:not(.empty-cell) { background-color: $solarized-dark-hll-bg; border-color: darken($solarized-dark-hll-bg, 15%); } + .line-coverage { + @include line-coverage-border-color($solarized-dark-coverage, $solarized-dark-no-coverage); + } + .diff-line-num.new, + .line-coverage.new, .line_content.new { @include diff-background($solarized-dark-new-bg, $solarized-dark-new-idiff, $solarized-dark-border); @@ -144,6 +152,7 @@ $solarized-dark-il: #2aa198; } .diff-line-num.old, + .line-coverage.old, .line_content.old { @include diff-background($solarized-dark-old-bg, $solarized-dark-old-idiff, $solarized-dark-border); @@ -172,6 +181,7 @@ $solarized-dark-il: #2aa198; &:not(.diff-expanded) + .diff-expanded, &.diff-expanded + .line_holder:not(.diff-expanded) { > .diff-line-num, + > .line-coverage, > .line_content { border-top: 1px solid $black; } @@ -179,6 +189,7 @@ $solarized-dark-il: #2aa198; &.diff-expanded { > .diff-line-num, + > .line-coverage, > .line_content { background: $solarized-dark-expanded-bg; border-color: $solarized-dark-expanded-bg; diff --git a/app/assets/stylesheets/highlight/themes/solarized-light.scss b/app/assets/stylesheets/highlight/themes/solarized-light.scss index 4e74a9ea50a..993370642c3 100644 --- a/app/assets/stylesheets/highlight/themes/solarized-light.scss +++ b/app/assets/stylesheets/highlight/themes/solarized-light.scss @@ -23,6 +23,8 @@ $solarized-light-hll-bg: #ddd8c5; $solarized-light-over-bg: #ded7fc; $solarized-light-expanded-border: #d2cdbd; $solarized-light-expanded-bg: #ece6d4; +$solarized-light-coverage: #859900; +$solarized-light-no-coverage: #cb4b16; $solarized-light-c: #93a1a1; $solarized-light-err: #586e75; $solarized-light-g: #586e75; @@ -135,12 +137,18 @@ $solarized-light-il: #2aa198; } td.diff-line-num.hll:not(.empty-cell), + td.line-coverage.hll:not(.empty-cell), td.line_content.hll:not(.empty-cell) { background-color: $solarized-light-hll-bg; border-color: darken($solarized-light-hll-bg, 15%); } + .line-coverage { + @include line-coverage-border-color($solarized-light-coverage, $solarized-light-no-coverage); + } + .diff-line-num.new, + .line-coverage.new, .line_content.new { @include diff-background($solarized-light-new-bg, $solarized-light-new-idiff, $solarized-light-border); @@ -152,6 +160,7 @@ $solarized-light-il: #2aa198; } .diff-line-num.old, + .line-coverage.old, .line_content.old { @include diff-background($solarized-light-old-bg, $solarized-light-old-idiff, $solarized-light-border); @@ -180,6 +189,7 @@ $solarized-light-il: #2aa198; &:not(.diff-expanded) + .diff-expanded, &.diff-expanded + .line_holder:not(.diff-expanded) { > .diff-line-num, + > .line-coverage, > .line_content { border-top: 1px solid $solarized-light-expanded-border; } @@ -187,6 +197,7 @@ $solarized-light-il: #2aa198; &.diff-expanded { > .diff-line-num, + > .line-coverage, > .line_content { background: $solarized-light-expanded-bg; border-color: $solarized-light-expanded-bg; diff --git a/app/assets/stylesheets/highlight/white_base.scss b/app/assets/stylesheets/highlight/white_base.scss index 973f94c63aa..d82a0794d29 100644 --- a/app/assets/stylesheets/highlight/white_base.scss +++ b/app/assets/stylesheets/highlight/white_base.scss @@ -151,6 +151,7 @@ pre.code, &:not(.diff-expanded) + .diff-expanded, &.diff-expanded + .line_holder:not(.diff-expanded) { > .diff-line-num, + > .line-coverage, > .line_content { border-top: 1px solid $white-expanded-border; } @@ -158,6 +159,7 @@ pre.code, &.diff-expanded { > .diff-line-num, + > .line-coverage, > .line_content { background: $white-expanded-bg; border-color: $white-expanded-bg; @@ -197,6 +199,22 @@ pre.code, background-color: $line-select-yellow; } } + + .line-coverage { + @include line-coverage-border-color($green-500, $orange-500); + + &.old { + background-color: $line-removed; + } + + &.new { + background-color: $line-added; + } + + &.hll:not(.empty-cell) { + background-color: $line-select-yellow; + } + } } // highlight line via anchor |