summaryrefslogtreecommitdiffstats
path: root/asset/css/list/item-list.less
blob: c5c0bd28ca0b5001617e9c0e45acc14f3a82ece8 (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
// Style

.item-list {
  list-style-type: none;
}

// Layout

.item-list {
  margin: 0;
  padding: 0;

  .list-item {
    display: flex;

    .main {
      flex: 1 1 auto;
      padding: .5em 0;
      width: 0;
      margin-left: .5em;
    }

    .visual {
      display: flex;
      align-items: center;
      flex-direction: column;
    }

    .caption {
      height: 3em;
      text-overflow: ellipsis;
      overflow: hidden;

      .line-clamp();

      img {
        max-height: 1em;
      }
    }

    header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
    }

    footer {
      display: flex;
      justify-content: space-between;
    }
  }

  > .empty-state-bar {
    margin: 0 1em;
  }
}

.item-list.default-layout .list-item {
  .title {
    display: inline-flex;
    align-items: baseline;
    white-space: nowrap;
    min-width: 0;

    > * {
      margin: 0 .28125em; // 0 calculated   width

      &:first-child {
        margin-left: 0;
      }

      &:last-child {
        margin-right: 0;
      }
    }

    .subject {
      .text-ellipsis();
    }
  }
}

.controls .list-item:not(:last-child) {
  margin-bottom: .5em;
}