change-avatar.less 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. //
  2. // Change Avatar Modal
  3. // --------------------------------------------------
  4. // Index
  5. .modal-change-avatar .modal-avatar-index {
  6. .avatar-preview {
  7. border-radius: @border-radius-large;
  8. margin: 0px auto;
  9. overflow: hidden;
  10. position: relative;
  11. width: 200px;
  12. height: 200px;
  13. .loader {
  14. display: none;
  15. position: absolute;
  16. top: 50px;
  17. height: 100px;
  18. .loader-spinning-wheel {
  19. border-width: 10px;
  20. border-color: #fff;
  21. border-left-color: transparent;
  22. border-right-color: transparent;
  23. width: 100px;
  24. height: 100px;
  25. }
  26. }
  27. &.preview-loading {
  28. img {
  29. .opacity(0.33);
  30. }
  31. .loader {
  32. display: block;
  33. }
  34. }
  35. @media (max-width: (@grid-float-breakpoint - 1)) {
  36. margin-bottom: @line-height-computed;
  37. width: 150px;
  38. height: 150px;
  39. img {
  40. width: 150px;
  41. height: 150px;
  42. }
  43. .loader {
  44. top: 25px;
  45. height: 100px;
  46. .loader-spinning-wheel {
  47. width: 100px;
  48. height: 100px;
  49. }
  50. }
  51. }
  52. }
  53. .btn {
  54. text-align: left;
  55. }
  56. }
  57. // Upload
  58. .modal-change-avatar .modal-avatar-upload {
  59. text-align: center;
  60. .btn-pick-file {
  61. background: transparent;
  62. border: 2px solid @gray-lighter;
  63. border-radius: @border-radius-large;
  64. padding: @padding-large-vertical @padding-large-horizontal * 1.5;
  65. .box-shadow(none);
  66. color: @gray-light;
  67. font-size: @font-size-large;
  68. text-align: center;
  69. &>.material-icon {
  70. display: block;
  71. margin: 0px auto;
  72. margin-bottom: @line-height-computed * .66;
  73. font-size: @line-height-computed * 2.5;
  74. width: @line-height-computed * 2.5;
  75. height: @line-height-computed * 2.5;
  76. }
  77. &:hover, &:active {
  78. border-color: @gray-light;
  79. }
  80. }
  81. .text-muted {
  82. margin-top: @line-height-computed * 0.66;
  83. }
  84. .upload-progress {
  85. img {
  86. border-radius: @border-radius-base;
  87. margin-bottom: @line-height-computed;
  88. max-height: 80px;
  89. width: auto;
  90. }
  91. .progress {
  92. width: 70%;
  93. margin: 0px auto;
  94. }
  95. }
  96. }
  97. // Crop
  98. .modal-avatar-crop .crop-form {
  99. margin: 0px auto;
  100. .cropit-image-zoom-input {
  101. margin-top: @line-height-computed / 2;
  102. // removes default webkit styles
  103. -webkit-appearance: none;
  104. // fix for FF unable to apply focus style bug
  105. border: 1px solid white;
  106. // required for proper track sizing in FF
  107. width: 100%;
  108. &::-webkit-slider-runnable-track {
  109. width: 100%;
  110. height: 8px;
  111. background: @gray-lighter;
  112. border: none;
  113. border-radius: 3px;
  114. }
  115. &::-webkit-slider-thumb {
  116. -webkit-appearance: none;
  117. border: none;
  118. height: 20px;
  119. width: 20px;
  120. border-radius: 50%;
  121. background: @gray-light;
  122. margin-top: -6px;
  123. }
  124. &:focus {
  125. outline: none;
  126. }
  127. &:focus::-webkit-slider-runnable-track {
  128. background: @gray-lighter;
  129. }
  130. &::-moz-range-track {
  131. width: 100%;
  132. height: 8px;
  133. background: @gray-lighter;
  134. border: none;
  135. border-radius: 4px;
  136. }
  137. &::-moz-range-thumb {
  138. border: none;
  139. height: 20px;
  140. width: 20px;
  141. border-radius: 50%;
  142. background: @gray-light;
  143. }
  144. /*hide the outline behind the border*/
  145. &:-moz-focusring{
  146. outline: 1px solid white;
  147. outline-offset: -1px;
  148. }
  149. &::-ms-track {
  150. width: 100%;
  151. height: 8px;
  152. /*remove bg colour from the track, we'll use ms-fill-lower and ms-fill-upper instead */
  153. background: transparent;
  154. /*leave room for the larger thumb to overflow with a transparent border */
  155. border-color: transparent;
  156. border-width: 8px 0;
  157. /*remove default tick marks*/
  158. color: transparent;
  159. }
  160. &::-ms-fill-lower {
  161. background: @gray-lighter;
  162. border-radius: 16px;
  163. }
  164. &::-ms-fill-upper {
  165. background: @gray-lighter;
  166. border-radius: 16px;
  167. }
  168. &::-ms-thumb {
  169. border: none;
  170. height: 20px;
  171. width: 20px;
  172. border-radius: 50%;
  173. background: @gray-light;
  174. }
  175. &:focus::-ms-fill-lower {
  176. background: @gray-lighter;
  177. }
  178. &:focus::-ms-fill-upper {
  179. background: @gray-lighter;
  180. }
  181. }
  182. }
  183. // Gallery
  184. .modal-change-avatar .modal-avatar-gallery {
  185. padding-bottom: 0px;
  186. .avatars-gallery {
  187. margin-bottom: @line-height-computed;
  188. h3 {
  189. margin-top: 0px;
  190. }
  191. }
  192. .avatars-gallery-images {
  193. .row {
  194. margin-bottom: @line-height-computed / 2;
  195. }
  196. .btn {
  197. border-radius: @border-radius-base + 2px;
  198. border: 2px solid @gray-lighter;
  199. background: none;
  200. padding: 2px;
  201. position: relative;
  202. &:hover, &:focus {
  203. border-color: @gray-light;
  204. }
  205. &.avatar-selected, &:active {
  206. border-color: @link-color;
  207. }
  208. img {
  209. border-radius: @border-radius-base;
  210. width: 100%;
  211. height: auto;
  212. }
  213. }
  214. }
  215. }