debian-mirror-gitlab/app/assets/stylesheets/page_bundles/merge_conflicts.scss

178 lines
4.5 KiB
SCSS
Raw Normal View History

2021-01-03 14:25:43 +05:30
@import 'mixins_and_variables_and_functions';
2021-03-08 18:12:59 +05:30
@import '../highlight/conflict_colors';
2016-09-13 17:45:13 +05:30
@mixin color-scheme($color) {
2017-08-17 22:00:37 +05:30
.header.line_content,
.diff-line-num {
2016-09-13 17:45:13 +05:30
&.origin {
2021-03-08 18:12:59 +05:30
background-color: map-get($conflict-colors, #{$color}-header-origin-neutral);
border-color: map-get($conflict-colors, #{$color}-header-origin-neutral);
2016-09-13 17:45:13 +05:30
button {
2021-03-08 18:12:59 +05:30
background-color: map-get($conflict-colors, #{$color}-button-origin-neutral);
border-color: darken(map-get($conflict-colors, #{$color}-button-origin-neutral), 15);
2016-09-13 17:45:13 +05:30
}
&.selected {
2021-03-08 18:12:59 +05:30
background-color: map-get($conflict-colors, #{$color}-header-origin-chosen);
border-color: map-get($conflict-colors, #{$color}-header-origin-chosen);
2016-09-13 17:45:13 +05:30
button {
2021-03-08 18:12:59 +05:30
background-color: map-get($conflict-colors, #{$color}-button-origin-chosen);
border-color: darken(map-get($conflict-colors, #{$color}-button-origin-chosen), 15);
2016-09-13 17:45:13 +05:30
}
}
&.unselected {
2021-03-08 18:12:59 +05:30
background-color: map-get($conflict-colors, #{$color}-header-not-chosen);
border-color: map-get($conflict-colors, #{$color}-header-not-chosen);
2016-09-13 17:45:13 +05:30
button {
2021-03-08 18:12:59 +05:30
background-color: lighten(map-get($conflict-colors, #{$color}-button-origin-neutral), 15);
border-color: map-get($conflict-colors, #{$color}-button-origin-neutral);
2016-09-13 17:45:13 +05:30
}
}
}
2016-11-03 12:29:30 +05:30
2016-09-13 17:45:13 +05:30
&.head {
2021-03-08 18:12:59 +05:30
background-color: map-get($conflict-colors, #{$color}-header-head-neutral);
border-color: map-get($conflict-colors, #{$color}-header-head-neutral);
2016-09-13 17:45:13 +05:30
button {
2021-03-08 18:12:59 +05:30
background-color: map-get($conflict-colors, #{$color}-button-head-neutral);
border-color: darken(map-get($conflict-colors, #{$color}-button-head-neutral), 15);
2016-09-13 17:45:13 +05:30
}
&.selected {
2021-03-08 18:12:59 +05:30
background-color: map-get($conflict-colors, #{$color}-header-head-chosen);
border-color: map-get($conflict-colors, #{$color}-header-head-chosen);
2016-09-13 17:45:13 +05:30
button {
2021-03-08 18:12:59 +05:30
background-color: map-get($conflict-colors, #{$color}-button-head-chosen);
border-color: darken(map-get($conflict-colors, #{$color}-button-head-chosen), 15);
2016-09-13 17:45:13 +05:30
}
}
&.unselected {
2021-03-08 18:12:59 +05:30
background-color: map-get($conflict-colors, #{$color}-header-not-chosen);
border-color: map-get($conflict-colors, #{$color}-header-not-chosen);
2016-09-13 17:45:13 +05:30
button {
2021-03-08 18:12:59 +05:30
background-color: lighten(map-get($conflict-colors, #{$color}-button-head-neutral), 15);
border-color: map-get($conflict-colors, #{$color}-button-head-neutral);
2016-09-13 17:45:13 +05:30
}
}
}
}
.line_content {
&.origin {
2021-03-08 18:12:59 +05:30
background-color: map-get($conflict-colors, #{$color}-line-origin-neutral);
2016-09-13 17:45:13 +05:30
&.selected {
2021-03-08 18:12:59 +05:30
background-color: map-get($conflict-colors, #{$color}-line-origin-chosen);
2016-09-13 17:45:13 +05:30
}
&.unselected {
2021-03-08 18:12:59 +05:30
background-color: map-get($conflict-colors, #{$color}-line-not-chosen);
2016-09-13 17:45:13 +05:30
}
}
2016-11-03 12:29:30 +05:30
2016-09-13 17:45:13 +05:30
&.head {
2021-03-08 18:12:59 +05:30
background-color: map-get($conflict-colors, #{$color}-line-head-neutral);
2016-09-13 17:45:13 +05:30
&.selected {
2021-03-08 18:12:59 +05:30
background-color: map-get($conflict-colors, #{$color}-line-head-chosen);
2016-09-13 17:45:13 +05:30
}
&.unselected {
2021-03-08 18:12:59 +05:30
background-color: map-get($conflict-colors, #{$color}-line-not-chosen);
2016-09-13 17:45:13 +05:30
}
}
}
}
#conflicts {
.white {
2019-07-07 11:18:12 +05:30
@include color-scheme('white'); }
2016-09-13 17:45:13 +05:30
.dark {
2019-07-07 11:18:12 +05:30
@include color-scheme('dark'); }
2016-09-13 17:45:13 +05:30
.monokai {
2019-07-07 11:18:12 +05:30
@include color-scheme('monokai'); }
2016-09-13 17:45:13 +05:30
.solarized-light {
2019-07-07 11:18:12 +05:30
@include color-scheme('solarized-light'); }
2016-09-13 17:45:13 +05:30
.solarized-dark {
2019-07-07 11:18:12 +05:30
@include color-scheme('solarized-dark'); }
2016-09-13 17:45:13 +05:30
2021-01-03 14:25:43 +05:30
.none {
.line_content.header {
button {
color: $gray-900;
}
}
}
2016-09-13 17:45:13 +05:30
.diff-wrap-lines .line_content {
white-space: normal;
min-height: 19px;
}
.line_content.header {
position: relative;
button {
border-radius: 2px;
font-size: 10px;
position: absolute;
right: 10px;
padding: 0;
outline: none;
2021-01-03 14:25:43 +05:30
color: var(--white, $white);
2016-09-13 17:45:13 +05:30
width: 75px; // static width to make 2 buttons have same width
height: 19px;
}
}
2016-11-03 12:29:30 +05:30
.editor-wrap {
&.is-loading {
.editor {
display: none;
}
.loading {
display: block;
}
}
&.saved {
.editor {
2021-01-03 14:25:43 +05:30
border-top: solid 2px var(--green-300, $green-300);
2016-11-03 12:29:30 +05:30
}
}
2017-08-17 22:00:37 +05:30
2016-11-03 12:29:30 +05:30
.editor {
pre {
height: 350px;
2018-03-17 18:26:18 +05:30
border: 0;
2016-11-03 12:29:30 +05:30
border-radius: 0;
margin-bottom: 0;
}
}
.loading {
display: none;
}
}
.discard-changes-alert {
2021-01-03 14:25:43 +05:30
background-color: var(--gray-10, $gray-10);
2016-11-03 12:29:30 +05:30
text-align: right;
padding: $gl-padding-top $gl-padding;
2021-01-03 14:25:43 +05:30
color: var(--gl-text-color, $gl-text-color);
2016-11-03 12:29:30 +05:30
}
2016-09-13 17:45:13 +05:30
}