Skip to content

Commit

Permalink
Merge pull request #5476 from nextcloud-libraries/backport/5400/next
Browse files Browse the repository at this point in the history
[next] fix(NcListItem): bring back old styling for two-line list items
  • Loading branch information
Antreesy authored Apr 20, 2024
2 parents 835ab30 + a8ef8fa commit 2d9e6eb
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions src/components/NcListItem/NcListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<ul>
<NcListItem
:name="'This is an active element with highlighted counter'"
:bold="false"
:bold="true"
:active="true"
:details="'1h'"
:counter-number="44"
Expand Down Expand Up @@ -63,7 +63,6 @@
:name="'This is an active element with outlined counter'"
:bold="false"
:active="true"
:details="'1h'"
:counter-number="44"
counterType="outlined">
<template #icon>
Expand Down Expand Up @@ -120,7 +119,7 @@
</NcListItem>
<NcListItem
:name="'Name of the element with highlighted counter'"
:bold="false"
:bold="true"
:force-display-actions="true"
:details="'1h'"
:counter-number="44"
Expand All @@ -147,7 +146,6 @@
:name="'Name of the element with outlined counter'"
:bold="false"
:force-display-actions="true"
:details="'1h'"
:counter-number="44"
counterType="outlined">
<template #icon>
Expand Down Expand Up @@ -403,7 +401,7 @@
</div>
<div v-if="hasSubname"
class="list-item-content__subname"
:class="{'line-two--bold': bold}">
:class="{'list-item-content__subname--bold': bold}">
<!-- @slot Slot for the second line of the component -->
<slot name="subname" />
</div>
Expand Down Expand Up @@ -772,12 +770,16 @@ export default {
min-width: 100px;
max-width: 300px;
flex: 1 1 10%;
text-overflow: ellipsis;
font-weight: 500;
}
.list-item-content__subname {
flex: 1 0;
min-width: 0;
color: var(--color-text-maxcontrast);
&--bold {
font-weight: 500;
}
}
// NcListItem
Expand Down Expand Up @@ -820,11 +822,12 @@ export default {
}
.list-item-content__details {
display: flex;
flex-direction: row;
flex-direction: column;
justify-content: end;
align-items: end;
}
&--one-line {
padding: 10px;
padding: 0 9px;
margin: 2px;
.list-item-content__main {
display: flex;
Expand All @@ -833,8 +836,8 @@ export default {
min-width: 0;
}
.list-item-content__details {
display: flex;
flex-direction: row;
align-items: unset;
justify-content: end;
}
}
Expand Down Expand Up @@ -879,7 +882,7 @@ export default {
&-details {
&__details {
color: var(--color-text-maxcontrast);
margin: 0 9px;
margin: 0 9px !important;
font-weight: normal;
}
&__extra {
Expand Down

0 comments on commit 2d9e6eb

Please sign in to comment.