aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-ui/resources/scss/modules/_mergeEditor.scss
blob: 000e42d5b433b855d959fe6cf1ae8ef708a52639 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
$yours-bg-color: $tlv-gray;
$theirs-bg-color: $tlv-light-gray;
$error-text-color: $red;
$selected-width: 1px;
$selected-color: $blue;

@mixin levels {
    @for $i from 1 to 6 {
        .level-#{$i} {
            padding-left: 18px + 10 * $i;
        }
    }
}

.merge-editor-modal {
    .modal-lg {
        width: 1300px;
    }
}

.merge-editor {
    margin: 30px 40px;
    max-height: 600px;
    border: 1px solid $light-gray;
    .grid-section {
        &.conflict-titles-section {
            @extend .body-1;
            background-color: $blue;
            height: 33px;
            padding-top: 6px;
            padding-bottom: 3px;
            color: $white;
            position: sticky;
            top: 0;
            z-index: 2;
            border-bottom: 1px solid $tlv-light-gray;
            .grid-item {
                padding-left: 10px;
            }
            .form-group {
                margin-bottom: 0;
                .checkbox {
                    label {
                        margin-right: 0;
                    }

                    text-align: right;

                    input[type='checkbox'] {
                        cursor: pointer;
                        margin-top: 1px;
                    }
                }
            }
        }
    }
    .merge-editor-body {
        max-height: 500px;
        overflow-y: scroll;
        padding: 10px;
        .conflict-section {
            margin-bottom: 0;
            border-left: 0;
            border-right: 0;
            padding: 5px 0;

            .conflict-resolve-btn {
                align-self: flex-end;
            }

            .grid-items {
                align-items: center;

                input[type='radio']:not(:checked) {
                    cursor: pointer;
                }
            }
        }

        .collapsible-section {
            display: flex;
            cursor: pointer;

            .conflict-title {
                @extend .heading-5-semibold;
                text-transform: uppercase;
            }
        }

        .merge-chevron {
            margin-right: 7px;
            &.right {
                transform: rotate(90deg);
            }
        }

        .grid-section .grid-items .field-col:not(.grid-col-title) {
            &.grid-col-yours {
                border-top: $selected-width solid $yours-bg-color;
                border-bottom: $selected-width solid $yours-bg-color;
            }

            &.theirs-color {
                border-top: $selected-width solid $theirs-bg-color;
                border-bottom: $selected-width solid $theirs-bg-color;
            }
        }

        .merge-editor-text-field {
            display: flex;
            justify-content: space-between;
            margin: 0;

            .field {
                color: $text-black;

                &.field-name:not(.field-object-name) {
                    color: $gray;
                }
            }

            &.diff {
                .field {
                    color: $red;
                }
            }

            &.grid-section {
                padding-bottom: 0;

                .grid-items {
                    flex: 1;

                    .field-col {
                        padding: 7px 0;
                        height: 100%;

                        &:not(:first-child) {
                            padding-left: 8px;
                        }

                        &.grid-col-yours {
                            background-color: $yours-bg-color;
                        }

                        &.grid-col-theirs {
                            background-color: $theirs-bg-color;
                        }

                        @include levels;

                        .field {
                            @extend .body-1;
                            flex: 2;
                            min-width: 0;

                            &.field-name {
                                @include multiline-ellipsis($bgColor: white);
                                &.diff {
                                    color: $red;
                                }
                                text-transform: uppercase;
                                &.field-object-name {
                                    @extend .body-1-semibold;
                                    margin-bottom: 5px;
                                    margin-top: 10px;
                                }
                            }

                            &.field-yours {
                                @include multiline-ellipsis($bgColor: $yours-bg-color);
                            }

                            &.field-theirs {
                                @include multiline-ellipsis($bgColor: $theirs-bg-color);
                            }
                            &.field-name,
                            &.field.field-yours,
                            &.field.field-theirs {
                                word-break: break-word;
                                text-align: initial;
                            }
                            &.empty-field {
                                padding-top: 2px;
                            }
                        }

                        *::after {
                            bottom: 0;
                        }
                    }
                }
            }

            &.field-error {
                @extend .body-1;
                color: $error-text-color;
                min-width: 0;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }
        }
    }
}