Commit 01df4997 authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch '59831-related-items-css-cleanup-ce' into 'master'

Remove related items CSS properties and add utility classes

See merge request gitlab-org/gitlab-ce!27583
parents 4518806c cfa19b14
...@@ -45,10 +45,10 @@ export default { ...@@ -45,10 +45,10 @@ export default {
'issuable-info-container': !canReorder, 'issuable-info-container': !canReorder,
'card-body': canReorder, 'card-body': canReorder,
}" }"
class="item-body" class="item-body d-flex align-items-center p-2 p-lg-3 p-xl-2 pl-xl-3"
> >
<div class="item-contents"> <div class="item-contents d-flex align-items-center flex-wrap flex-grow-1 flex-xl-nowrap">
<div class="item-title d-flex align-items-center"> <div class="item-title d-flex align-items-center mb-1 mb-xl-0">
<icon <icon
v-if="hasState" v-if="hasState"
v-tooltip v-tooltip
...@@ -65,13 +65,15 @@ export default { ...@@ -65,13 +65,15 @@ export default {
name="eye-slash" name="eye-slash"
:size="16" :size="16"
:title="__('Confidential')" :title="__('Confidential')"
class="confidential-icon append-right-4" class="confidential-icon append-right-4 align-self-baseline align-self-md-auto mt-xl-0"
:aria-label="__('Confidential')" :aria-label="__('Confidential')"
/> />
<a :href="computedPath" class="sortable-link">{{ title }}</a> <a :href="computedPath" class="sortable-link">{{ title }}</a>
</div> </div>
<div class="item-meta"> <div class="item-meta d-flex flex-wrap mt-xl-0 justify-content-xl-end flex-xl-nowrap">
<div class="d-flex align-items-center item-path-id"> <div
class="d-flex align-items-center item-path-id order-md-0 mt-md-0 mt-1 ml-xl-2 mr-xl-auto"
>
<icon <icon
v-if="hasState" v-if="hasState"
v-tooltip v-tooltip
...@@ -88,7 +90,9 @@ export default { ...@@ -88,7 +90,9 @@ export default {
}}</span> }}</span>
{{ pathIdSeparator }}{{ itemId }} {{ pathIdSeparator }}{{ itemId }}
</div> </div>
<div class="item-meta-child d-flex align-items-center"> <div
class="item-meta-child d-flex align-items-center order-0 flex-wrap mr-md-1 ml-md-auto ml-xl-2 flex-xl-nowrap"
>
<span v-if="hasPipeline" class="mr-ci-status pr-2"> <span v-if="hasPipeline" class="mr-ci-status pr-2">
<a :href="pipelineStatus.details_path"> <a :href="pipelineStatus.details_path">
<ci-icon v-gl-tooltip :status="pipelineStatus" :title="pipelineStatusTooltip" /> <ci-icon v-gl-tooltip :status="pipelineStatus" :title="pipelineStatusTooltip" />
...@@ -105,7 +109,7 @@ export default { ...@@ -105,7 +109,7 @@ export default {
<issue-assignees <issue-assignees
v-if="assignees.length" v-if="assignees.length"
:assignees="assignees" :assignees="assignees"
class="item-assignees d-inline-flex" class="item-assignees d-inline-flex align-items-center align-self-end ml-auto ml-md-0 mb-md-0 order-2 flex-xl-grow-0 mt-xl-0 mr-xl-1"
/> />
</div> </div>
</div> </div>
...@@ -115,7 +119,7 @@ export default { ...@@ -115,7 +119,7 @@ export default {
v-tooltip v-tooltip
:disabled="removeDisabled" :disabled="removeDisabled"
type="button" type="button"
class="btn btn-default btn-svg btn-item-remove js-issue-item-remove-button qa-remove-issue-button" class="btn btn-default btn-svg btn-item-remove js-issue-item-remove-button qa-remove-issue-button mr-xl-0 align-self-xl-center"
title="Remove" title="Remove"
aria-label="Remove" aria-label="Remove"
@click="onRemoveRequest" @click="onRemoveRequest"
......
...@@ -16,10 +16,7 @@ $item-weight-max-width: 48px; ...@@ -16,10 +16,7 @@ $item-weight-max-width: 48px;
} }
.item-body { .item-body {
display: flex;
position: relative; position: relative;
align-items: center;
padding: $gl-padding-8;
line-height: $gl-line-height; line-height: $gl-line-height;
.issue-token-state-icon-open { .issue-token-state-icon-open {
...@@ -49,14 +46,11 @@ $item-weight-max-width: 48px; ...@@ -49,14 +46,11 @@ $item-weight-max-width: 48px;
} }
.confidential-icon { .confidential-icon {
align-self: baseline;
color: $orange-600; color: $orange-600;
margin-right: $gl-padding-4;
} }
.item-title { .item-title {
flex-basis: 100%; flex-basis: 100%;
margin-bottom: $gl-padding-8;
font-size: $gl-font-size-small; font-size: $gl-font-size-small;
&.mr-title { &.mr-title {
...@@ -80,24 +74,12 @@ $item-weight-max-width: 48px; ...@@ -80,24 +74,12 @@ $item-weight-max-width: 48px;
} }
} }
.item-contents {
display: flex;
align-items: center;
flex-wrap: wrap;
flex-grow: 1;
}
.item-meta { .item-meta {
display: flex;
flex-wrap: wrap;
flex-basis: 100%; flex-basis: 100%;
font-size: $gl-font-size-small; font-size: $gl-font-size-small;
color: $gl-text-color-secondary; color: $gl-text-color-secondary;
.item-meta-child { .item-meta-child {
order: 0;
display: flex;
flex-wrap: wrap;
flex-basis: 100%; flex-basis: 100%;
} }
...@@ -117,16 +99,10 @@ $item-weight-max-width: 48px; ...@@ -117,16 +99,10 @@ $item-weight-max-width: 48px;
} }
.item-weight { .item-weight {
margin-right: 0;
max-width: $item-weight-max-width; max-width: $item-weight-max-width;
} }
.item-assignees { .item-assignees {
order: 2;
align-self: flex-end;
align-items: center;
margin-left: auto;
.user-avatar-link { .user-avatar-link {
margin-right: -$gl-padding-4; margin-right: -$gl-padding-4;
...@@ -162,7 +138,6 @@ $item-weight-max-width: 48px; ...@@ -162,7 +138,6 @@ $item-weight-max-width: 48px;
} }
.item-path-id { .item-path-id {
margin-top: $gl-padding-4;
font-size: $gl-font-size-xs; font-size: $gl-font-size-xs;
white-space: nowrap; white-space: nowrap;
...@@ -176,8 +151,10 @@ $item-weight-max-width: 48px; ...@@ -176,8 +151,10 @@ $item-weight-max-width: 48px;
display: block; display: block;
} }
&:not(.mr-item-path) { @include media-breakpoint-down(sm) {
order: 1; &:not(.mr-item-path) {
order: 1;
}
} }
} }
...@@ -219,15 +196,14 @@ $item-weight-max-width: 48px; ...@@ -219,15 +196,14 @@ $item-weight-max-width: 48px;
.item-body { .item-body {
.item-contents { .item-contents {
min-width: 0; min-width: 0;
}
.item-title { .item-title {
flex-basis: unset; flex-basis: unset;
// 95% because we compensate // 95% because we compensate
// for remove button which is // for remove button which is
// positioned absolutely // positioned absolutely
width: 95%; width: 95%;
margin-bottom: $gl-padding-4;
}
} }
.btn-item-remove { .btn-item-remove {
...@@ -236,34 +212,19 @@ $item-weight-max-width: 48px; ...@@ -236,34 +212,19 @@ $item-weight-max-width: 48px;
} }
.item-meta { .item-meta {
.item-path-id {
order: 0;
margin-top: 0;
}
.item-meta-child { .item-meta-child {
flex-basis: unset; flex-basis: unset;
margin-left: auto;
margin-right: $gl-padding-4;
~ .item-assignees { ~ .item-assignees {
margin-left: $gl-padding-4; margin-left: $gl-padding-4;
} }
} }
.item-assignees {
margin-bottom: 0;
margin-left: 0;
order: 2;
}
} }
} }
/* Medium devices (desktops, 992px and up) */ /* Medium devices (desktops, 992px and up) */
@include media-breakpoint-up(lg) { @include media-breakpoint-up(lg) {
.item-body { .item-body {
padding: $gl-padding;
.item-title { .item-title {
font-size: $gl-font-size; font-size: $gl-font-size;
} }
...@@ -277,12 +238,7 @@ $item-weight-max-width: 48px; ...@@ -277,12 +238,7 @@ $item-weight-max-width: 48px;
/* Large devices (large desktops, 1200px and up) */ /* Large devices (large desktops, 1200px and up) */
@include media-breakpoint-up(xl) { @include media-breakpoint-up(xl) {
.item-body { .item-body {
padding: $gl-padding-8;
padding-left: $gl-padding;
.item-title { .item-title {
display: flex;
margin-bottom: 0;
min-width: 0; min-width: 0;
width: auto; width: auto;
flex-basis: unset; flex-basis: unset;
...@@ -293,43 +249,18 @@ $item-weight-max-width: 48px; ...@@ -293,43 +249,18 @@ $item-weight-max-width: 48px;
display: block; display: block;
margin-right: $gl-padding-8; margin-right: $gl-padding-8;
} }
.confidential-icon {
align-self: auto;
margin-top: 0;
}
} }
} }
.item-contents { .item-contents {
flex-wrap: nowrap;
overflow: hidden; overflow: hidden;
} }
.item-meta { .item-meta {
margin-top: 0;
justify-content: flex-end;
flex: 1; flex: 1;
flex-wrap: nowrap;
.item-meta-child {
margin-left: $gl-padding-8;
flex-wrap: nowrap;
}
}
.item-path-id {
order: 0;
margin-top: 0;
margin-left: $gl-padding-8;
margin-right: auto;
} }
.item-assignees { .item-assignees {
flex-grow: 0;
margin-top: 0;
margin-right: $gl-padding-4;
.avatar { .avatar {
height: $gl-padding-24; height: $gl-padding-24;
width: $gl-padding-24; width: $gl-padding-24;
...@@ -345,10 +276,8 @@ $item-weight-max-width: 48px; ...@@ -345,10 +276,8 @@ $item-weight-max-width: 48px;
.btn-item-remove { .btn-item-remove {
position: relative; position: relative;
align-self: center;
top: initial; top: initial;
right: 0; right: 0;
margin-right: 0;
padding: $btn-sm-side-margin; padding: $btn-sm-side-margin;
&:hover { &:hover {
...@@ -357,10 +286,6 @@ $item-weight-max-width: 48px; ...@@ -357,10 +286,6 @@ $item-weight-max-width: 48px;
} }
.sortable-link { .sortable-link {
display: block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
line-height: 1.3; line-height: 1.3;
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment