basic.styl 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. /* The MIT License */
  2. // Copyright (c) 2012 Matias Meno <m@tias.me>
  3. // Permission is hereby granted, free of charge, to any person obtaining a copy of
  4. // this software and associated documentation files (the "Software"), to deal in
  5. // the Software without restriction, including without limitation the rights to
  6. // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
  7. // of the Software, and to permit persons to whom the Software is furnished to do
  8. // so, subject to the following conditions:
  9. // The above copyright notice and this permission notice shall be included in all
  10. // copies or substantial portions of the Software.
  11. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  12. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  13. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  14. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  15. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  16. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  17. // SOFTWARE.
  18. @import "nib"
  19. .dropzone
  20. .dropzone *
  21. .dropzone-previews
  22. .dropzone-previews *
  23. box-sizing border-box
  24. .dropzone
  25. position relative
  26. border 1px solid rgba(0, 0, 0, 0.08)
  27. background rgba(0, 0, 0, 0.02)
  28. padding 1em
  29. &.dz-clickable
  30. cursor pointer
  31. .dz-message
  32. .dz-message span
  33. cursor pointer
  34. *
  35. cursor default
  36. .dz-message
  37. opacity 1
  38. &.dz-drag-hover
  39. border-color rgba(0, 0, 0, 0.15)
  40. background rgba(0, 0, 0, 0.04)
  41. &.dz-started
  42. .dz-message
  43. display none
  44. .dropzone
  45. .dropzone-previews
  46. .dz-preview
  47. background rgba(255, 255, 255, 0.8)
  48. position relative
  49. display inline-block
  50. margin 17px
  51. vertical-align top
  52. border 1px solid #acacac
  53. padding 6px 6px 6px 6px
  54. &.dz-file-preview
  55. [data-dz-thumbnail]
  56. display none
  57. .dz-details
  58. width 100px
  59. height @width
  60. position relative
  61. background #ebebeb
  62. padding 5px
  63. margin-bottom 22px
  64. .dz-filename
  65. overflow hidden
  66. height 100%
  67. img
  68. absolute top left
  69. width @width
  70. height @width
  71. .dz-size
  72. absolute bottom -28px left 3px
  73. height 28px
  74. line-height @height
  75. &.dz-error
  76. .dz-error-mark
  77. display block
  78. &.dz-success
  79. .dz-success-mark
  80. display block
  81. &:hover
  82. .dz-details
  83. img
  84. display none
  85. .dz-success-mark
  86. .dz-error-mark
  87. display none
  88. position absolute
  89. width 40px
  90. height 40px
  91. font-size 30px
  92. text-align center
  93. right -10px
  94. top -10px
  95. .dz-success-mark
  96. color #8CC657
  97. .dz-error-mark
  98. color #EE162D
  99. .dz-progress
  100. position absolute
  101. top 100px
  102. left 6px
  103. right 6px
  104. height 6px
  105. background #d7d7d7
  106. display none
  107. .dz-upload
  108. display block
  109. position absolute
  110. top 0
  111. bottom 0
  112. left 0
  113. width 0%
  114. background-color #8CC657
  115. &.dz-processing
  116. .dz-progress
  117. display block
  118. .dz-error-message
  119. display none
  120. absolute top -5px left -20px
  121. background rgba(245, 245, 245, 0.8)
  122. padding 8px 10px
  123. color #800
  124. min-width 140px
  125. max-width 500px
  126. z-index 500
  127. &:hover.dz-error
  128. .dz-error-message
  129. display block