debian-mirror-gitlab/app/assets/stylesheets/highlight/common.scss

96 lines
2.3 KiB
SCSS
Raw Normal View History

2019-07-07 11:18:12 +05:30
@import '../framework/variables';
2021-03-08 18:12:59 +05:30
@import './conflict_colors';
2019-07-07 11:18:12 +05:30
@mixin diff-background($background, $idiff, $border) {
background: $background;
&.line_content span.idiff {
background: $idiff;
}
&.diff-line-num {
border-color: $border;
}
}
@mixin dark-diff-match-line {
color: $dark-diff-match-bg;
background: $dark-diff-match-color;
}
2019-10-12 21:52:04 +05:30
@mixin diff-expansion($background, $border, $link) {
background-color: $background;
2021-01-29 00:20:46 +05:30
.diff-td,
2019-10-12 21:52:04 +05:30
td {
border-top: 1px solid $border;
border-bottom: 1px solid $border;
}
a {
color: $link;
}
}
2020-04-08 14:13:33 +05:30
@mixin line-coverage-border-color($coverage, $no-coverage) {
transition: border-left 0.1s ease-out;
&.coverage {
2021-03-08 18:12:59 +05:30
border-left: 4px solid $coverage;
2020-04-08 14:13:33 +05:30
}
&.no-coverage {
2021-03-08 18:12:59 +05:30
border-left: 2px solid $no-coverage;
2020-04-08 14:13:33 +05:30
}
}
2021-01-29 00:20:46 +05:30
@mixin line-number-hover($color) {
background-color: $color;
border-color: darken($color, 5%);
a {
color: darken($color, 15%);
}
}
2021-03-08 18:12:59 +05:30
@mixin conflict-colors($theme) {
.diff-line-num {
&.conflict_marker_our,
&.conflict_our {
background-color: map-get($conflict-colors, #{$theme}-header-head-neutral);
border-color: map-get($conflict-colors, #{$theme}-header-head-neutral);
}
&.conflict_marker_their,
&.conflict_their {
background-color: map-get($conflict-colors, #{$theme}-header-origin-neutral);
border-color: map-get($conflict-colors, #{$theme}-header-origin-neutral);
}
}
.line_holder {
.line_content,
.line-coverage {
&.conflict_marker_our {
background-color: map-get($conflict-colors, #{$theme}-header-head-neutral);
border-color: map-get($conflict-colors, #{$theme}-header-head-neutral);
}
&.conflict_marker_their {
background-color: map-get($conflict-colors, #{$theme}-header-origin-neutral);
border-color: map-get($conflict-colors, #{$theme}-header-origin-neutral);
}
&.conflict_our {
background-color: map-get($conflict-colors, #{$theme}-line-head-neutral);
border-color: map-get($conflict-colors, #{$theme}-line-head-neutral);
}
&.conflict_their {
background-color: map-get($conflict-colors, #{$theme}-line-origin-neutral);
border-color: map-get($conflict-colors, #{$theme}-line-origin-neutral);
}
}
}
}