wekan/client/components/cards/minicard.styl
Maxime Quandalle 8b5fd09ff3 Fix layout on Apple devices
The layout issue was related to the lack of autoprexing for CSS
properties. c69f993 did improve the reload time significantly but for
that I had to replace `mquandalle:stylus` by the core `stylus`
package. Unfortunatly it is currently difficult to run an autoprefixer
with the core CSS compilers (as reported in
https://github.com/meteor/meteor/issues/5219).

So instead we rely on `nib` which transparently define some mixins for
autoprefixing, the only restrictions being that we have to manually
`@import 'nib'` on top of stylus files.

Fixes #461
2016-01-02 14:26:48 +01:00

149 lines
2.8 KiB
Stylus

@import 'nib'
.minicard-wrapper
cursor: pointer
position: relative
display: flex
align-items: center
margin-bottom: 9px
&.placeholder
background: darken(white, 20%)
border-radius: 2px
&.ui-sortable-helper
cursor: grabbing
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,.15)
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)
&:hover:not(.minicard-composer),
.is-selected &,
.draggable-hover-card &
background: darken(white, 3%)
.draggable-hover-card &
background: darken(white, 7%)
.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
position: relative
img
height: 100%
width: 100%
.minicard-labels
float: right
display: flex
.minicard-label
width: 11px
height: @width
border-radius: 2px
margin-left: 3px
.badges
float: left
margin-top: 7px
color: darken(white, 50%)
&:empty
display: none
.badge
float: left
margin-right: 11px
margin-bottom: 3px
font-size: 0.9em
.badge-icon,
.badge-text
vertical-align: top
.badge-text
font-size: 0.9em
padding-left: 2px
line-height: 14px
.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
&.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: 36px
margin-bottom: 20px
overflow-y: auto
@media screen and (max-width: 800px)
.minicard
.is-selected &
transform: translateX(0px)
border-bottom-right-radius: 0
border-top-right-radius: 0
z-index: 15
box-shadow: 0 1px 2px rgba(0,0,0,.15)