minicard.styl 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. @import 'nib'
  2. .minicard-wrapper
  3. cursor: pointer
  4. position: relative
  5. display: flex
  6. align-items: center
  7. margin-bottom: 9px
  8. &.placeholder
  9. background: darken(white, 20%)
  10. border-radius: 2px
  11. &.ui-sortable-helper
  12. cursor: grabbing
  13. transform: rotate(4deg)
  14. display: block !important
  15. .and-n-other
  16. width: 100%
  17. height: 16px
  18. padding: 4px
  19. background-color: darken(white, 5%)
  20. text-align: center
  21. border-radius: 3px
  22. .multi-selection-checkbox
  23. display: none
  24. .multi-selection-checkbox + .minicard
  25. margin-left: 8px
  26. .minicard
  27. padding: 6px 8px 2px
  28. position: relative
  29. flex: 1
  30. flex-wrap: wrap
  31. background-color: #fff
  32. min-height: 20px
  33. box-shadow: 0 1px 2px rgba(0,0,0,.15)
  34. border-radius: 2px
  35. color: #4d4d4d
  36. overflow: hidden
  37. transition: transform 0.2s,
  38. border-radius 0.2s
  39. .is-selected &
  40. transform: translateX(11px)
  41. border-bottom-right-radius: 0
  42. border-top-right-radius: 0
  43. z-index: 25
  44. box-shadow: -2px 1px 2px rgba(0,0,0,.2)
  45. &:hover:not(.minicard-composer),
  46. .is-selected &,
  47. .draggable-hover-card &
  48. background: darken(white, 3%)
  49. .draggable-hover-card &
  50. background: darken(white, 7%)
  51. .minicard-cover
  52. background-position: center
  53. background-repeat: no-repeat
  54. background-size: contain
  55. height: 145px
  56. user-select: none
  57. margin: -6px -8px 6px -8px
  58. border-radius: top 2px
  59. .minicard-labels
  60. float: right
  61. display: flex
  62. .minicard-label
  63. width: 11px
  64. height: @width
  65. border-radius: 2px
  66. margin-left: 3px
  67. .badges
  68. float: left
  69. margin-top: 7px
  70. color: darken(white, 50%)
  71. &:empty
  72. display: none
  73. .badge
  74. float: left
  75. margin-right: 11px
  76. margin-bottom: 3px
  77. font-size: 0.9em
  78. &:last-of-type
  79. margin-right: 0
  80. .badge-icon,
  81. .badge-text
  82. vertical-align: middle
  83. &.is-finished
  84. background: #3cb500
  85. padding: 0px 3px
  86. border-radius: 3px
  87. color: white
  88. .badge-icon,
  89. .badge-text
  90. vertical-align: middle//didn't figure why use top, it'd be easier to fill bg if it's middle. This was introduced in commit "91cfcf7b12b5e7c137c2e765b2c378dde6b82966" & "* Improve the design of the minicards badges" was mentioned.
  91. &.badge-comment
  92. margin-bottom: 0.1rem
  93. .badge-text
  94. font-size: 0.9em
  95. padding-left: 2px
  96. line-height: 14px
  97. .check-list-text
  98. padding-left: 0px
  99. line-height: 12px
  100. .minicard-members
  101. float: right
  102. margin: 2px -8px -2px 0
  103. .member
  104. float: right
  105. border-radius: 50%
  106. height: 28px
  107. width: @height
  108. + .badges
  109. margin-top: 10px
  110. .minicard-members:empty
  111. display: none
  112. &.minicard-composer
  113. margin-bottom: 10px
  114. textarea.minicard-composer-textarea,
  115. textarea.minicard-composer-textarea:focus
  116. resize: none
  117. background: none
  118. border: none
  119. box-shadow: none
  120. height: auto
  121. margin: 0
  122. padding: 0
  123. max-height: 162px
  124. min-height: 36px
  125. margin-bottom: 20px
  126. overflow-y: auto
  127. @media screen and (max-width: 800px)
  128. .minicard
  129. .is-selected &
  130. transform: translateX(0px)
  131. border-bottom-right-radius: 0
  132. border-top-right-radius: 0
  133. z-index: 15
  134. box-shadow: 0 1px 2px rgba(0,0,0,.15)