fileinput.scss 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490
  1. /*!
  2. * bootstrap-fileinput v4.4.2
  3. * http://plugins.krajee.com/file-input
  4. *
  5. * Krajee default styling for bootstrap-fileinput.
  6. *
  7. * Author: Kartik Visweswaran
  8. * Copyright: 2014 - 2017, Kartik Visweswaran, Krajee.com
  9. *
  10. * Licensed under the BSD 3-Clause
  11. * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
  12. */
  13. // Default Variables
  14. // --------------------------
  15. $bootstrap-fileinput-img-path: "../img" !default;
  16. // COMMON STYLES
  17. // --------------------------
  18. .file-loading {
  19. top: 0;
  20. right: 0;
  21. width: 25px;
  22. height: 25px;
  23. font-size: 999px;
  24. text-align: right;
  25. color: #fff;
  26. background: transparent url('#{$bootstrap-fileinput-img-path}/loading.gif') top left no-repeat;
  27. border: none;
  28. }
  29. .file-object {
  30. margin: 0 0 -5px 0;
  31. padding: 0;
  32. }
  33. .btn-file {
  34. position: relative;
  35. overflow: hidden;
  36. input[type=file] {
  37. position: absolute;
  38. top: 0;
  39. right: 0;
  40. min-width: 100%;
  41. min-height: 100%;
  42. text-align: right;
  43. opacity: 0;
  44. background: none repeat scroll 0 0 transparent;
  45. cursor: inherit;
  46. display: block;
  47. }
  48. }
  49. .file-caption-name {
  50. display: inline-block;
  51. overflow: hidden;
  52. height: 20px;
  53. word-break: break-all;
  54. }
  55. .input-group-lg .file-caption-name {
  56. height: 25px;
  57. }
  58. .file-zoom-dialog {
  59. text-align: left;
  60. }
  61. .file-error-message {
  62. color: #a94442;
  63. background-color: #f2dede;
  64. margin: 5px;
  65. border: 1px solid #ebccd1;
  66. border-radius: 4px;
  67. padding: 15px;
  68. pre, ul {
  69. margin: 0;
  70. text-align: left;
  71. }
  72. pre {
  73. margin: 5px 0;
  74. }
  75. }
  76. .file-caption-disabled {
  77. background-color: #EEEEEE;
  78. cursor: not-allowed;
  79. opacity: 1;
  80. }
  81. .file-preview {
  82. border-radius: 5px;
  83. border: 1px solid #ddd;
  84. padding: 5px;
  85. width: 100%;
  86. margin-bottom: 5px;
  87. }
  88. .krajee-default {
  89. &.file-preview-frame {
  90. position: relative;
  91. display: table;
  92. margin: 8px;
  93. border: 1px solid #ddd;
  94. box-shadow: 1px 1px 5px 0 #a2958a;
  95. padding: 6px;
  96. float: left;
  97. text-align: center;
  98. &:not(.file-preview-error):hover {
  99. box-shadow: 3px 3px 5px 0 #333;
  100. }
  101. .kv-file-content {
  102. height: 170px;
  103. }
  104. .file-thumbnail-footer {
  105. height: 70px;
  106. }
  107. }
  108. .file-preview-image {
  109. vertical-align: middle;
  110. font: 40px Impact, Charcoal, sans-serif;
  111. color: green;
  112. }
  113. .file-preview-text {
  114. display: block;
  115. color: #428bca;
  116. border: 1px solid #ddd;
  117. font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  118. outline: none;
  119. padding: 8px;
  120. resize: none;
  121. }
  122. .file-preview-html {
  123. border: 1px solid #ddd;
  124. padding: 8px;
  125. overflow: auto;
  126. }
  127. &[data-template="audio"] .file-preview-audio {
  128. display: table-cell;
  129. vertical-align: middle;
  130. height: 170px;
  131. border: 1px solid #ddd;
  132. border-radius: 5px;
  133. }
  134. .file-preview-audio audio {
  135. vertical-align: middle;
  136. }
  137. .file-zoom-dialog .file-preview-text {
  138. font-size: 1.2em;
  139. }
  140. .file-preview-other {
  141. left: 0;
  142. top: 0;
  143. right: 0;
  144. bottom: 0;
  145. margin: auto;
  146. text-align: center;
  147. vertical-align: middle;
  148. padding: 10px;
  149. &:hover {
  150. opacity: 0.8;
  151. }
  152. }
  153. .file-actions, .file-other-error {
  154. text-align: left;
  155. }
  156. .file-other-icon {
  157. font-size: 8em;
  158. }
  159. .file-actions {
  160. margin-top: 15px;
  161. }
  162. .file-footer-buttons {
  163. float: right;
  164. }
  165. .file-footer-caption {
  166. display: block;
  167. white-space: nowrap;
  168. overflow: hidden;
  169. text-overflow: ellipsis;
  170. width: 160px;
  171. text-align: center;
  172. padding-top: 4px;
  173. font-size: 11px;
  174. color: #777;
  175. margin: 5px auto;
  176. }
  177. .file-preview-error {
  178. opacity: 0.65;
  179. box-shadow: none;
  180. }
  181. .file-preview-frame:not(.file-preview-error) .file-footer-caption:hover {
  182. color: #000;
  183. }
  184. .file-drag-handle, .file-upload-indicator {
  185. position: absolute;
  186. text-align: center;
  187. bottom: -6px;
  188. left: -6px;
  189. padding: 8px 8px 1px 3px;
  190. border-left: none;
  191. border-bottom: none;
  192. border-right: 1px solid #8a6d3b;
  193. border-top: 1px solid #8a6d3b;
  194. border-top-right-radius: 24px;
  195. font-size: 12px;
  196. }
  197. .file-drag-handle {
  198. background-color: #d9edf7;
  199. border-color: #bce8f1;
  200. }
  201. .file-upload-indicator {
  202. font-size: 13px;
  203. background-color: #fcf8e3;
  204. border-color: #faebcc;
  205. padding-bottom: 0;
  206. }
  207. &.file-preview-error .file-upload-indicator {
  208. background-color: #f2dede;
  209. border-color: #ebccd1;
  210. }
  211. &.file-preview-success .file-upload-indicator {
  212. background-color: #dff0d8;
  213. border-color: #d6e9c6;
  214. }
  215. &.file-preview-loading .file-upload-indicator {
  216. background-color: #e5e5e5;
  217. border-color: #777;
  218. }
  219. .file-thumb-progress {
  220. height: 10px;
  221. .progress, .progress-bar {
  222. height: 10px;
  223. font-size: 9px;
  224. line-height: 10px;
  225. }
  226. }
  227. .file-thumbnail-footer {
  228. position: relative;
  229. }
  230. .file-thumb-progress {
  231. position: absolute;
  232. top: 35px;
  233. left: 0;
  234. right: 0;
  235. }
  236. &.kvsortable-ghost {
  237. background: #e1edf7;
  238. border: 2px solid #a1abff;
  239. }
  240. }
  241. /* noinspection CssOverwrittenProperties */
  242. .file-zoom-dialog .file-other-icon {
  243. font-size: 8em;
  244. font-size: 65vmin;
  245. }
  246. .file-input-new {
  247. .file-preview, .close, .glyphicon-file, .fileinput-remove-button, .fileinput-upload-button {
  248. display: none;
  249. }
  250. }
  251. .file-input-ajax-new {
  252. .fileinput-remove-button, .fileinput-upload-button {
  253. display: none;
  254. }
  255. }
  256. .file-caption-main {
  257. width: 100%;
  258. }
  259. .file-input-ajax-new .no-browse .input-group-btn, .file-input-new .no-browse .input-group-btn {
  260. display: none;
  261. }
  262. .file-input-ajax-new .no-browse .form-control, .file-input-new .no-browse .form-control {
  263. border-top-right-radius: 4px;
  264. border-bottom-right-radius: 4px;
  265. }
  266. .file-thumb-loading {
  267. background: transparent url('#{$bootstrap-fileinput-img-path}/loading.gif') no-repeat scroll center center content-box !important;
  268. }
  269. .file-sortable .file-drag-handle {
  270. cursor: move;
  271. cursor: -webkit-grabbing;
  272. opacity: 1;
  273. &:hover {
  274. opacity: 0.7;
  275. }
  276. }
  277. .file-drop-zone {
  278. border: 1px dashed #aaa;
  279. border-radius: 4px;
  280. height: 100%;
  281. text-align: center;
  282. vertical-align: middle;
  283. margin: 12px 15px 12px 12px;
  284. padding: 5px;
  285. }
  286. .file-drop-zone-title {
  287. color: #aaa;
  288. font-size: 1.6em;
  289. padding: 85px 10px;
  290. cursor: default;
  291. }
  292. .file-preview .clickable, .clickable .file-drop-zone-title {
  293. cursor: pointer;
  294. }
  295. .file-drop-zone {
  296. &.clickable {
  297. &:hover {
  298. border: 2px dashed #999;
  299. }
  300. &:focus {
  301. border: 2px solid #5acde2;
  302. }
  303. }
  304. .file-preview-thumbnails {
  305. cursor: default;
  306. }
  307. }
  308. .file-highlighted {
  309. border: 2px dashed #999 !important;
  310. background-color: #f0f0f0;
  311. }
  312. .file-uploading {
  313. background: url('#{$bootstrap-fileinput-img-path}/loading-sm.gif') no-repeat center bottom 10px;
  314. opacity: 0.65;
  315. }
  316. .file-zoom-fullscreen {
  317. &.modal {
  318. position: fixed;
  319. top: 0;
  320. right: 0;
  321. bottom: 0;
  322. left: 0;
  323. }
  324. .modal-dialog {
  325. position: fixed;
  326. margin: 0;
  327. width: 100%;
  328. height: 100%;
  329. padding: 0;
  330. }
  331. .modal-content {
  332. border-radius: 0;
  333. box-shadow: none;
  334. }
  335. .modal-body {
  336. overflow-y: auto;
  337. }
  338. }
  339. .file-zoom-dialog {
  340. .modal-body {
  341. position: relative !important;
  342. }
  343. .btn-navigate {
  344. position: absolute;
  345. padding: 0;
  346. margin: 0;
  347. background: transparent;
  348. text-decoration: none;
  349. outline: none;
  350. opacity: 0.7;
  351. top: 45%;
  352. font-size: 4em;
  353. color: #1c94c4;
  354. }
  355. .floating-buttons {
  356. position: absolute;
  357. top: 5px;
  358. right: 10px;
  359. }
  360. }
  361. .floating-buttons {
  362. z-index: 3000;
  363. .btn {
  364. z-index: 3000;
  365. }
  366. }
  367. .file-zoom-dialog .kv-zoom-actions .btn, .floating-buttons .btn {
  368. margin-left: 3px;
  369. }
  370. .file-zoom-dialog {
  371. .btn-navigate {
  372. &:not([disabled]) {
  373. &:hover, &:focus {
  374. outline: none;
  375. box-shadow: none;
  376. opacity: 0.5;
  377. }
  378. }
  379. &[disabled] {
  380. opacity: 0.3;
  381. }
  382. }
  383. .btn-prev {
  384. left: 1px;
  385. }
  386. .btn-next {
  387. right: 1px;
  388. }
  389. }
  390. .file-zoom-content {
  391. height: 480px;
  392. text-align: center;
  393. .file-preview-image {
  394. max-height: 100%;
  395. }
  396. }
  397. .file-preview- .file-zoom-content .file-preview-video {
  398. max-height: 100%;
  399. }
  400. .file-preview-initial.sortable-chosen {
  401. background-color: #d9edf7;
  402. }
  403. /* IE 10 fix */
  404. .btn-file ::-ms-browse {
  405. width: 100%;
  406. height: 100%;
  407. }