fileinput.scss 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  1. /*!
  2. * bootstrap-fileinput v4.4.5
  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. .kv-hidden {
  14. display: none;
  15. }
  16. // exif orientations
  17. .rotate-2 {
  18. transform: rotateY(180deg);
  19. }
  20. .rotate-3 {
  21. transform: rotate(180deg);
  22. }
  23. .rotate-4 {
  24. transform: rotate(180deg) rotateY(180deg);
  25. }
  26. .rotate-5 {
  27. transform: rotate(270deg) rotateY(180deg);
  28. }
  29. .rotate-6 {
  30. transform: rotate(90deg);
  31. }
  32. .rotate-7 {
  33. transform: rotate(90deg) rotateY(180deg);
  34. }
  35. .rotate-8 {
  36. transform: rotate(270deg);
  37. }
  38. // other styles
  39. input[type=file].file-loading {
  40. width: 0;
  41. height: 0;
  42. }
  43. .file-loading {
  44. input[type=file] {
  45. width: 0;
  46. height: 0;
  47. }
  48. &:before {
  49. content: " Loading...";
  50. display: inline-block;
  51. position: relative;
  52. padding-left: 20px;
  53. line-height: 16px;
  54. font-size: 13px;
  55. font-variant: small-caps;
  56. color: #999;
  57. background: transparent url('../img/loading.gif') top left no-repeat;
  58. }
  59. &[dir=rtl]:before {
  60. background: transparent url('../img/loading.gif') top right no-repeat;
  61. padding-left: 0;
  62. padding-right: 20px;
  63. }
  64. }
  65. .file-object {
  66. margin: 0 0 -5px 0;
  67. padding: 0;
  68. }
  69. .btn-file {
  70. position: relative;
  71. overflow: hidden;
  72. input[type=file] {
  73. position: absolute;
  74. top: 0;
  75. right: 0;
  76. min-width: 100%;
  77. min-height: 100%;
  78. text-align: right;
  79. opacity: 0;
  80. background: none repeat scroll 0 0 transparent;
  81. cursor: inherit;
  82. display: block;
  83. }
  84. }
  85. .file-caption {
  86. position: relative;
  87. .file-caption-name {
  88. width: 100%;
  89. margin: 0;
  90. padding: 0;
  91. box-shadow: none;
  92. border: none;
  93. background: none;
  94. outline: none;
  95. }
  96. }
  97. .file-caption-icon {
  98. display: none;
  99. position: absolute;
  100. line-height: 1;
  101. left: 8px;
  102. }
  103. .file-caption.icon-visible {
  104. .file-caption-icon {
  105. display: inline-block;
  106. }
  107. .file-caption-name {
  108. padding-left: 15px;
  109. }
  110. }
  111. .file-error-message {
  112. color: #a94442;
  113. background-color: #f2dede;
  114. margin: 5px;
  115. border: 1px solid #ebccd1;
  116. border-radius: 4px;
  117. padding: 15px;
  118. pre, ul {
  119. margin: 0;
  120. text-align: left;
  121. }
  122. pre {
  123. margin: 5px 0;
  124. }
  125. }
  126. .file-caption-disabled {
  127. background-color: #eeeeee;
  128. cursor: not-allowed;
  129. opacity: 1;
  130. }
  131. .file-preview {
  132. border-radius: 5px;
  133. border: 1px solid #ddd;
  134. padding: 8px;
  135. width: 100%;
  136. margin-bottom: 5px;
  137. position: relative;
  138. .btn-xs {
  139. padding: 1px 5px;
  140. font-size: 12px;
  141. line-height: 1.5;
  142. border-radius: 3px;
  143. }
  144. .fileinput-remove {
  145. position: absolute;
  146. top: 1px;
  147. right: 1px;
  148. line-height: 10px;
  149. }
  150. }
  151. .file-preview-image {
  152. font: 40px Impact, Charcoal, sans-serif;
  153. color: green;
  154. }
  155. .krajee-default {
  156. &.file-preview-frame {
  157. position: relative;
  158. margin: 8px;
  159. border: 1px solid #ddd;
  160. box-shadow: 1px 1px 5px 0 #a2958a;
  161. padding: 6px;
  162. float: left;
  163. text-align: center;
  164. &:not(.file-preview-error):hover {
  165. box-shadow: 3px 3px 5px 0 #333;
  166. }
  167. .kv-file-content {
  168. width: 213px;
  169. height: 160px;
  170. }
  171. .file-thumbnail-footer {
  172. height: 70px;
  173. }
  174. }
  175. .file-preview-text {
  176. display: block;
  177. color: #428bca;
  178. border: 1px solid #ddd;
  179. font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  180. outline: none;
  181. padding: 8px;
  182. resize: none;
  183. }
  184. .file-preview-html {
  185. border: 1px solid #ddd;
  186. padding: 8px;
  187. overflow: auto;
  188. }
  189. .file-preview-other:hover {
  190. opacity: 0.8;
  191. }
  192. .file-actions, .file-other-error {
  193. text-align: left;
  194. }
  195. .file-other-icon {
  196. font-size: 6em;
  197. }
  198. .file-footer-buttons {
  199. float: right;
  200. }
  201. .file-footer-caption {
  202. display: block;
  203. text-align: center;
  204. padding-top: 4px;
  205. font-size: 11px;
  206. color: #777;
  207. margin-bottom: 15px;
  208. }
  209. .file-preview-error {
  210. opacity: 0.65;
  211. box-shadow: none;
  212. }
  213. .file-preview-frame:not(.file-preview-error) .file-footer-caption:hover {
  214. color: #000;
  215. }
  216. .file-drag-handle, .file-upload-indicator {
  217. float: left;
  218. margin: 5px 0 -5px 0;
  219. width: 16px;
  220. height: 16px;
  221. }
  222. .file-thumb-progress {
  223. height: 11px;
  224. .progress, .progress-bar {
  225. height: 11px;
  226. font-size: 9px;
  227. line-height: 10px;
  228. }
  229. }
  230. .file-thumbnail-footer {
  231. position: relative;
  232. }
  233. .file-thumb-progress {
  234. position: absolute;
  235. top: 37px;
  236. left: 0;
  237. right: 0;
  238. }
  239. .file-caption-info, .file-size-info {
  240. display: block;
  241. white-space: nowrap;
  242. overflow: hidden;
  243. text-overflow: ellipsis;
  244. width: 160px;
  245. height: 15px;
  246. margin: auto;
  247. }
  248. &.kvsortable-ghost {
  249. background: #e1edf7;
  250. border: 2px solid #a1abff;
  251. }
  252. }
  253. .kv-upload-progress {
  254. .progress, .progress-bar {
  255. height: 20px;
  256. line-height: 20px;
  257. }
  258. .progress {
  259. margin: 10px 0;
  260. overflow: hidden;
  261. }
  262. }
  263. .file-zoom-dialog .file-other-icon {
  264. //noinspection CssOverwrittenProperties
  265. font-size: 22em;
  266. //noinspection CssOverwrittenProperties
  267. font-size: 50vmin;
  268. }
  269. .file-input-new {
  270. .file-preview, .close, .glyphicon-file, .fileinput-remove-button, .fileinput-upload-button {
  271. display: none;
  272. }
  273. }
  274. .file-input-ajax-new {
  275. .fileinput-remove-button, .fileinput-upload-button {
  276. display: none;
  277. }
  278. }
  279. .file-caption-main {
  280. width: 100%;
  281. }
  282. .file-input-ajax-new .no-browse .input-group-btn, .file-input-new .no-browse .input-group-btn {
  283. display: none;
  284. }
  285. .file-input-ajax-new .no-browse .form-control, .file-input-new .no-browse .form-control {
  286. border-top-right-radius: 4px;
  287. border-bottom-right-radius: 4px;
  288. }
  289. .file-thumb-loading {
  290. background: transparent url('../img/loading.gif') no-repeat scroll center center content-box !important;
  291. }
  292. .file-sortable .file-drag-handle {
  293. cursor: move;
  294. cursor: -webkit-grabbing;
  295. opacity: 1;
  296. &:hover {
  297. opacity: 0.7;
  298. }
  299. }
  300. .file-drop-zone {
  301. border: 1px dashed #aaa;
  302. border-radius: 4px;
  303. height: 100%;
  304. text-align: center;
  305. vertical-align: middle;
  306. margin: 12px 15px 12px 12px;
  307. padding: 5px;
  308. }
  309. .file-drop-zone-title {
  310. color: #aaa;
  311. font-size: 1.6em;
  312. padding: 85px 10px;
  313. cursor: default;
  314. }
  315. .file-preview .clickable, .clickable .file-drop-zone-title {
  316. cursor: pointer;
  317. }
  318. .file-drop-zone {
  319. &.clickable {
  320. &:hover {
  321. border: 2px dashed #999;
  322. }
  323. &:focus {
  324. border: 2px solid #5acde2;
  325. }
  326. }
  327. .file-preview-thumbnails {
  328. cursor: default;
  329. }
  330. }
  331. .file-highlighted {
  332. border: 2px dashed #999 !important;
  333. background-color: #f0f0f0;
  334. }
  335. .file-uploading {
  336. background: url('../img/loading-sm.gif') no-repeat center bottom 10px;
  337. opacity: 0.65;
  338. }
  339. .file-zoom-dialog {
  340. .modal-dialog {
  341. position: relative;
  342. width: auto;
  343. }
  344. .modal-header {
  345. display: -ms-flexbox;
  346. display: flex;
  347. -ms-flex-align: center;
  348. align-items: center;
  349. -ms-flex-pack: justify;
  350. justify-content: space-between;
  351. &:before, &:after {
  352. display: none;
  353. }
  354. }
  355. }
  356. @media (min-width: 576px) {
  357. .file-zoom-dialog .modal-dialog {
  358. max-width: 500px;
  359. }
  360. }
  361. @media (min-width: 992px) {
  362. .file-zoom-dialog .modal-lg {
  363. max-width: 800px;
  364. }
  365. }
  366. .file-zoom-fullscreen {
  367. &.modal {
  368. position: fixed;
  369. top: 0;
  370. right: 0;
  371. bottom: 0;
  372. left: 0;
  373. }
  374. .modal-dialog {
  375. position: fixed;
  376. margin: 0;
  377. width: 100%;
  378. height: 100%;
  379. max-width: 100%;
  380. max-height: 100%;
  381. padding: 0;
  382. }
  383. .modal-content {
  384. border-radius: 0;
  385. box-shadow: none;
  386. }
  387. .modal-body {
  388. overflow-y: auto;
  389. }
  390. }
  391. .file-zoom-dialog {
  392. .btn-navigate {
  393. position: absolute;
  394. padding: 0;
  395. margin: 0;
  396. background: transparent;
  397. text-decoration: none;
  398. outline: none;
  399. opacity: 0.7;
  400. top: 45%;
  401. font-size: 4em;
  402. color: #1c94c4;
  403. }
  404. .floating-buttons {
  405. position: absolute;
  406. top: 5px;
  407. right: 10px;
  408. }
  409. }
  410. .btn-kv {
  411. display: inline-block;
  412. text-align: center;
  413. width: 30px;
  414. height: 30px;
  415. line-height: 30px;
  416. padding: 0;
  417. font-size: 0.875rem;
  418. border-radius: 0.2rem;
  419. }
  420. .kv-zoom-actions .btn-kv {
  421. margin-left: 3px;
  422. }
  423. .floating-buttons {
  424. .btn-kv {
  425. margin-left: 3px;
  426. z-index: 3000;
  427. }
  428. z-index: 3000;
  429. }
  430. .file-zoom-dialog {
  431. .btn-navigate {
  432. &:not([disabled]):hover {
  433. outline: none;
  434. box-shadow: none;
  435. opacity: 0.6;
  436. }
  437. &[disabled] {
  438. opacity: 0.3;
  439. }
  440. }
  441. .btn-prev {
  442. left: 1px;
  443. }
  444. .btn-next {
  445. right: 1px;
  446. }
  447. }
  448. .file-zoom-content {
  449. height: 480px;
  450. text-align: center;
  451. .file-preview-image, .file-preview-video {
  452. max-height: 100%;
  453. }
  454. > .file-object {
  455. &.type-image {
  456. width: auto;
  457. height: auto;
  458. min-height: inherit;
  459. max-width: 100%;
  460. max-height: 100%;
  461. }
  462. &.type-video, &.type-flash {
  463. width: auto;
  464. height: 100%;
  465. max-width: 100%;
  466. max-height: 100%;
  467. }
  468. &.type-audio {
  469. width: auto;
  470. height: 30px;
  471. }
  472. &.type-pdf, &.type-html, &.type-text, &.type-default {
  473. width: 100%;
  474. }
  475. }
  476. }
  477. .file-preview-initial.sortable-chosen {
  478. background-color: #d9edf7;
  479. }
  480. .hide-content .kv-file-content {
  481. display: none;
  482. }
  483. // IE 10 fix
  484. .btn-file ::-ms-browse {
  485. font-size: 10000px;
  486. width: 100%;
  487. height: 100%;
  488. }
  489. .file-zoom-content .is-portrait-gt4 {
  490. margin-top: 60px;
  491. }
  492. .file-zoom-dialog .kv-zoom-title {
  493. font-weight: 300;
  494. color: #999;
  495. max-width: 50%;
  496. overflow: hidden;
  497. white-space: nowrap;
  498. text-overflow: ellipsis;
  499. }
  500. @media screen and (max-width: 767px) {
  501. .file-preview-thumbnails {
  502. display: flex;
  503. justify-content: center;
  504. align-items: center;
  505. flex-direction: column;
  506. }
  507. .file-zoom-dialog .modal-header {
  508. flex-direction: column;
  509. }
  510. }
  511. @media screen and (max-width: 350px) {
  512. .krajee-default.file-preview-frame .kv-file-content {
  513. width: 160px;
  514. }
  515. }