fileinput.scss 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489
  1. /*!
  2. * bootstrap-fileinput v4.4.1
  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. image-orientation: from-image;
  111. }
  112. .file-preview-text {
  113. display: block;
  114. color: #428bca;
  115. border: 1px solid #ddd;
  116. font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  117. outline: none;
  118. padding: 8px;
  119. resize: none;
  120. }
  121. .file-preview-html {
  122. border: 1px solid #ddd;
  123. padding: 8px;
  124. overflow: auto;
  125. }
  126. &[data-template="audio"] .file-preview-audio {
  127. display: table-cell;
  128. vertical-align: middle;
  129. height: 170px;
  130. border: 1px solid #ddd;
  131. border-radius: 5px;
  132. }
  133. .file-preview-audio audio {
  134. vertical-align: middle;
  135. }
  136. .file-zoom-dialog .file-preview-text {
  137. font-size: 1.2em;
  138. }
  139. .file-preview-other {
  140. left: 0;
  141. top: 0;
  142. right: 0;
  143. bottom: 0;
  144. margin: auto;
  145. text-align: center;
  146. vertical-align: middle;
  147. padding: 10px;
  148. &:hover {
  149. opacity: 0.8;
  150. }
  151. }
  152. .file-actions, .file-other-error {
  153. text-align: left;
  154. }
  155. .file-other-icon {
  156. font-size: 8em;
  157. }
  158. .file-actions {
  159. margin-top: 15px;
  160. }
  161. .file-footer-buttons {
  162. float: right;
  163. }
  164. .file-footer-caption {
  165. display: block;
  166. white-space: nowrap;
  167. overflow: hidden;
  168. text-overflow: ellipsis;
  169. width: 160px;
  170. text-align: center;
  171. padding-top: 4px;
  172. font-size: 11px;
  173. color: #777;
  174. margin: 5px auto;
  175. }
  176. .file-preview-error {
  177. opacity: 0.65;
  178. box-shadow: none;
  179. }
  180. .file-preview-frame:not(.file-preview-error) .file-footer-caption:hover {
  181. color: #000;
  182. }
  183. .file-drag-handle, .file-upload-indicator {
  184. position: absolute;
  185. text-align: center;
  186. bottom: -6px;
  187. left: -6px;
  188. padding: 8px 8px 1px 3px;
  189. border-left: none;
  190. border-bottom: none;
  191. border-right: 1px solid #8a6d3b;
  192. border-top: 1px solid #8a6d3b;
  193. border-top-right-radius: 24px;
  194. font-size: 12px;
  195. }
  196. .file-drag-handle {
  197. background-color: #d9edf7;
  198. border-color: #bce8f1;
  199. }
  200. .file-upload-indicator {
  201. font-size: 13px;
  202. background-color: #fcf8e3;
  203. border-color: #faebcc;
  204. padding-bottom: 0;
  205. }
  206. &.file-preview-error .file-upload-indicator {
  207. background-color: #f2dede;
  208. border-color: #ebccd1;
  209. }
  210. &.file-preview-success .file-upload-indicator {
  211. background-color: #dff0d8;
  212. border-color: #d6e9c6;
  213. }
  214. &.file-preview-loading .file-upload-indicator {
  215. background-color: #e5e5e5;
  216. border-color: #777;
  217. }
  218. .file-thumb-progress {
  219. height: 10px;
  220. .progress, .progress-bar {
  221. height: 10px;
  222. font-size: 9px;
  223. line-height: 10px;
  224. }
  225. }
  226. .file-thumbnail-footer {
  227. position: relative;
  228. }
  229. .file-thumb-progress {
  230. position: absolute;
  231. top: 35px;
  232. left: 0;
  233. right: 0;
  234. }
  235. &.kvsortable-ghost {
  236. background: #e1edf7;
  237. border: 2px solid #a1abff;
  238. }
  239. }
  240. /* noinspection CssOverwrittenProperties */
  241. .file-zoom-dialog .file-other-icon {
  242. font-size: 8em;
  243. font-size: 65vmin;
  244. }
  245. .file-input-new {
  246. .file-preview, .close, .glyphicon-file, .fileinput-remove-button, .fileinput-upload-button {
  247. display: none;
  248. }
  249. }
  250. .file-input-ajax-new {
  251. .fileinput-remove-button, .fileinput-upload-button {
  252. display: none;
  253. }
  254. }
  255. .file-caption-main {
  256. width: 100%;
  257. }
  258. .file-input-ajax-new .no-browse .input-group-btn, .file-input-new .no-browse .input-group-btn {
  259. display: none;
  260. }
  261. .file-input-ajax-new .no-browse .form-control, .file-input-new .no-browse .form-control {
  262. border-top-right-radius: 4px;
  263. border-bottom-right-radius: 4px;
  264. }
  265. .file-thumb-loading {
  266. background: transparent url('#{$bootstrap-fileinput-img-path}/loading.gif') no-repeat scroll center center content-box !important;
  267. }
  268. .file-sortable .file-drag-handle {
  269. cursor: move;
  270. cursor: -webkit-grabbing;
  271. opacity: 1;
  272. &:hover {
  273. opacity: 0.7;
  274. }
  275. }
  276. .file-drop-zone {
  277. border: 1px dashed #aaa;
  278. border-radius: 4px;
  279. height: 100%;
  280. text-align: center;
  281. vertical-align: middle;
  282. margin: 12px 15px 12px 12px;
  283. padding: 5px;
  284. }
  285. .file-drop-zone-title {
  286. color: #aaa;
  287. font-size: 1.6em;
  288. padding: 85px 10px;
  289. cursor: default;
  290. }
  291. .file-preview .clickable, .clickable .file-drop-zone-title {
  292. cursor: pointer;
  293. }
  294. .file-drop-zone {
  295. &.clickable {
  296. &:hover {
  297. border: 2px dashed #999;
  298. }
  299. &:focus {
  300. border: 2px solid #5acde2;
  301. }
  302. }
  303. .file-preview-thumbnails {
  304. cursor: default;
  305. }
  306. }
  307. .file-highlighted {
  308. border: 2px dashed #999 !important;
  309. background-color: #f0f0f0;
  310. }
  311. .file-uploading {
  312. background: url('#{$bootstrap-fileinput-img-path}/loading-sm.gif') no-repeat center bottom 10px;
  313. opacity: 0.65;
  314. }
  315. .file-zoom-fullscreen {
  316. &.modal {
  317. position: fixed;
  318. top: 0;
  319. right: 0;
  320. bottom: 0;
  321. left: 0;
  322. }
  323. .modal-dialog {
  324. position: fixed;
  325. margin: 0;
  326. width: 100%;
  327. height: 100%;
  328. padding: 0;
  329. }
  330. .modal-content {
  331. border-radius: 0;
  332. box-shadow: none;
  333. }
  334. .modal-body {
  335. overflow-y: auto;
  336. }
  337. }
  338. .file-zoom-dialog {
  339. .modal-body {
  340. position: relative !important;
  341. }
  342. .btn-navigate {
  343. position: absolute;
  344. padding: 0;
  345. margin: 0;
  346. background: transparent;
  347. text-decoration: none;
  348. outline: none;
  349. opacity: 0.7;
  350. top: 45%;
  351. font-size: 4em;
  352. color: #1c94c4;
  353. }
  354. .floating-buttons {
  355. position: absolute;
  356. top: 5px;
  357. right: 10px;
  358. }
  359. }
  360. .floating-buttons {
  361. z-index: 3000;
  362. .btn {
  363. z-index: 3000;
  364. }
  365. }
  366. .file-zoom-dialog .kv-zoom-actions .btn, .floating-buttons .btn {
  367. margin-left: 3px;
  368. }
  369. .file-zoom-dialog {
  370. .btn-navigate {
  371. &:not([disabled]) {
  372. &:hover, &:focus {
  373. outline: none;
  374. box-shadow: none;
  375. opacity: 0.5;
  376. }
  377. }
  378. &[disabled] {
  379. opacity: 0.3;
  380. }
  381. }
  382. .btn-prev {
  383. left: 1px;
  384. }
  385. .btn-next {
  386. right: 1px;
  387. }
  388. }
  389. .file-zoom-content {
  390. height: 480px;
  391. text-align: center;
  392. .file-preview-image {
  393. max-height: 100%;
  394. }
  395. }
  396. .file-preview- .file-zoom-content .file-preview-video {
  397. max-height: 100%;
  398. }
  399. .file-preview-initial.sortable-chosen {
  400. background-color: #d9edf7;
  401. }
  402. /* IE 10 fix */
  403. .btn-file ::-ms-browse {
  404. width: 100%;
  405. height: 100%;
  406. }