summaryrefslogtreecommitdiffstats
path: root/client/components/cards/minicard.styl
blob: ebad8dece0af7473e6ff2333043273f59c322e87 (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
.minicard-wrapper
  cursor: pointer
  position: relative
  display: flex
  align-items: center
  margin-bottom: 9px

  &.draggable-hover-card
    background-color: #f0f0f0
    border-bottom-color: #c2c2c2

  &.placeholder
    background: darken(white, 20%)
    border-radius: 2px

  &.ui-sortable-helper
    transform: rotate(4deg)
    display: block !important

    .and-n-other
      width: 100%
      height: 16px
      padding: 4px
      background-color: darken(white, 5%)
      text-align: center
      border-radius: 3px

    .multi-selection-checkbox
      display: none

  .multi-selection-checkbox + .minicard
    margin-left: 8px

.minicard
  padding: 6px 8px 2px
  position: relative
  flex: 1
  flex-wrap: wrap
  background-color: #fff
  min-height: 20px
  box-shadow: 0 1px 2px rgba(0,0,0,.2)
  border-radius: 2px
  color: #4d4d4d
  overflow: hidden
  transition: transform 0.2s,
              border-radius 0.2s

  .is-selected &
    transform: translateX(11px)
    border-bottom-right-radius: 0
    border-top-right-radius: 0
    z-index: 25
    box-shadow: -2px 1px 2px rgba(0,0,0,.2)

  .minicard-cover
    background-position: center
    background-repeat: no-repeat
    background-size: cover
    height: 145px
    user-select: none
    margin: -6px -8px 6px -8px
    border-radius: top 2px

    &.no-preview-size
      background-size: auto
      background-position: center

  .minicard-dropzone
    display: none

  .minicard.drophover .minicard-dropzone
    background: rgba(255, 255, 255, .8)

  .minicard-title
    display: block
    font-weight: 400
    overflow: hidden
    margin-bottom: 2px
    text-decoration: none
    word-wrap: break-word
    clear: both

    &::selection
      background: transparent

  .minicard-labels
    float: right

    .minicard-label
      float: right
      width: 11px
      height: @width
      border-radius: 2px
      margin-right: 3px

  .minicard-members
    float: right
    margin: 2px -8px -2px 0

    .member
      float: right
      border-radius: 50%
      height: 28px
      width: @height

    + .badges
      margin-top: 10px

  .minicard-members:empty
    display: none

  .badges
    float: left

    &:empty
      display: none

  &.minicard-composer
    margin-bottom: 10px

    textarea.minicard-composer-textarea,
    textarea.minicard-composer-textarea:focus
      resize: none
      background: none
      border: none
      box-shadow: none
      height: auto
      margin: 0
      padding: 0
      max-height: 162px
      min-height: 54px
      overflow-y: auto