1
0

files.scss 23 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130
  1. /* Copyright (c) 2011, Jan-Christoph Borchardt, http://jancborchardt.net
  2. This file is licensed under the Affero General Public License version 3 or later.
  3. See the COPYING-README file. */
  4. /* SETTINGS */
  5. #files-setting-showhidden {
  6. padding-bottom: 8px;
  7. }
  8. /* FILE MENU */
  9. .actions {
  10. padding: 5px;
  11. height: 100%;
  12. display: inline-block;
  13. float: left;
  14. }
  15. .actions input, .actions button, .actions .button { margin:0; float:left; }
  16. .actions .button a { color: #555; }
  17. .actions .button a:hover,
  18. .actions .button a:focus,
  19. .actions .button a:active {
  20. color: #333;
  21. }
  22. .actions.creatable {
  23. position: relative;
  24. display: flex;
  25. flex: 1 1;
  26. .button:not(:last-child) {
  27. margin-right: 3px;
  28. }
  29. }
  30. .actions.hidden {
  31. display: none;
  32. }
  33. #trash {
  34. margin-right: 8px;
  35. float: right;
  36. z-index: 1010;
  37. padding: 10px;
  38. font-weight: normal;
  39. }
  40. .newFileMenu .error,
  41. .newFileMenu .error + .icon-confirm,
  42. #fileList .error {
  43. color: var(--color-error);
  44. border-color: var(--color-error);
  45. }
  46. /* FILE TABLE */
  47. #filestable {
  48. position: relative;
  49. width: 100%;
  50. min-width: 250px;
  51. display: flex;
  52. flex-direction: column;
  53. // hide table if emptycontent is not hidden
  54. #emptycontent:not(.hidden) ~ & {
  55. display: none;
  56. }
  57. }
  58. #filestable.hidden {
  59. display: none;
  60. }
  61. @media only screen and (min-width: $breakpoint-mobile + 1) {
  62. #filestable {
  63. // floating header
  64. thead {
  65. position: -webkit-sticky;
  66. position: sticky;
  67. // header + breadcrumbs
  68. top: $header-height;
  69. padding-top: 40px;
  70. // under breadcrumbs, over file list
  71. z-index: 55;
  72. display: block;
  73. background-color: var(--color-main-background-translucent);
  74. }
  75. }
  76. }
  77. /* fit app list view heights */
  78. .app-files #app-content>.viewcontainer {
  79. min-height: 0%;
  80. }
  81. .app-files #app-content {
  82. transition: background-color 0.3s ease;
  83. // force the width to be the full width to not go bigger than the screen
  84. // flex will grow for the mobile view if necessary
  85. width: calc(100% - 300px);
  86. }
  87. .file-drag, .file-drag #filestable tbody tr, .file-drag #filestable tbody tr:hover {
  88. transition: background-color 0.3s ease!important;
  89. background-color: var(--color-primary-light) !important;
  90. }
  91. .app-files #app-content.dir-drop {
  92. background-color: var(--color-main-background) !important;
  93. }
  94. .file-drag #filestable tbody tr, .file-drag #filestable tbody tr:hover{
  95. background-color: transparent !important;
  96. }
  97. .app-files #app-content.dir-drop #filestable tbody tr.dropping-to-dir{
  98. background-color: var(--color-primary-light) !important;
  99. }
  100. /* icons for sidebar */
  101. .nav-icon-files {
  102. @include icon-color('folder', 'files', $color-black);
  103. }
  104. .nav-icon-recent {
  105. @include icon-color('recent', 'files', $color-black);
  106. }
  107. .nav-icon-favorites {
  108. @include icon-color('star-dark', 'actions', $color-black, 2, true);
  109. }
  110. .nav-icon-sharingin,
  111. .nav-icon-sharingout,
  112. .nav-icon-shareoverview {
  113. @include icon-color('share', 'files', $color-black);
  114. }
  115. .nav-icon-sharinglinks {
  116. @include icon-color('public', 'files', $color-black);
  117. }
  118. .nav-icon-extstoragemounts {
  119. @include icon-color('external', 'files', $color-black);
  120. }
  121. .nav-icon-trashbin {
  122. @include icon-color('delete', 'files', $color-black);
  123. }
  124. .nav-icon-trashbin-starred {
  125. @include icon-color('delete', 'files', #ff0000);
  126. }
  127. .nav-icon-deletedshares {
  128. @include icon-color('unshare', 'files', $color-black);
  129. }
  130. .nav-icon-favorites-starred {
  131. @include icon-color('star-dark', 'actions', $color-yellow, 2, true);
  132. }
  133. #app-navigation .nav-files a.nav-icon-files {
  134. width: auto;
  135. }
  136. /* button needs overrides due to navigation styles */
  137. #app-navigation .nav-files a.new {
  138. width: 40px;
  139. height: 32px;
  140. padding: 0 10px;
  141. margin: 0;
  142. cursor: pointer;
  143. }
  144. #app-navigation .nav-files a.new.hidden {
  145. display: none;
  146. }
  147. #app-navigation .nav-files a.new.disabled {
  148. opacity: 0.3;
  149. }
  150. #filestable tbody tr {
  151. transition: background-color 0.3s ease;
  152. height: 51px;
  153. }
  154. #filestable tbody tr:hover,
  155. #filestable tbody tr:focus,
  156. #filestable tbody .name:focus,
  157. #filestable tbody tr:active,
  158. #filestable tbody tr.highlighted,
  159. #filestable tbody tr.highlighted .name:focus,
  160. #filestable tbody tr.selected,
  161. #filestable tbody tr.searchresult,
  162. #filestable tbody tr:hover .filename form,
  163. table tr.mouseOver td {
  164. transition: background-color 0.3s ease;
  165. background-color: var(--color-background-dark);
  166. }
  167. tbody a { color: var(--color-main-text); }
  168. span.conflict-path, span.extension, span.uploading, td.date {
  169. color: var(--color-text-maxcontrast);
  170. }
  171. span.conflict-path, span.extension {
  172. -webkit-transition: opacity 300ms;
  173. -moz-transition: opacity 300ms;
  174. -o-transition: opacity 300ms;
  175. transition: opacity 300ms;
  176. vertical-align: top;
  177. }
  178. tr:hover span.conflict-path,
  179. tr:focus span.conflict-path,
  180. tr:hover span.extension,
  181. tr:focus span.extension {
  182. opacity: 1;
  183. color: var(--color-text-maxcontrast);
  184. }
  185. table th, table th a {
  186. color: var(--color-text-maxcontrast);
  187. }
  188. table.multiselect th a {
  189. color: var(--color-main-text);
  190. }
  191. table th .columntitle {
  192. display: block;
  193. padding: 15px;
  194. height: 50px;
  195. box-sizing: border-box;
  196. -moz-box-sizing: border-box;
  197. vertical-align: middle;
  198. }
  199. table.multiselect th .columntitle {
  200. display: inline-block;
  201. }
  202. table th .columntitle.name {
  203. padding-left: 0;
  204. margin-left: 50px;
  205. }
  206. table th .sort-indicator {
  207. width: 10px;
  208. height: 8px;
  209. margin-left: 5px;
  210. display: inline-block;
  211. vertical-align: text-bottom;
  212. opacity: .3;
  213. }
  214. .sort-indicator.hidden,
  215. .multiselect .sort-indicator,
  216. table.multiselect th:hover .sort-indicator.hidden,
  217. table.multiselect th:focus .sort-indicator.hidden {
  218. visibility: hidden;
  219. }
  220. .multiselect .sort, .multiselect .sort span {
  221. cursor: default;
  222. }
  223. table th:hover .sort-indicator.hidden,
  224. table th:focus .sort-indicator.hidden {
  225. visibility: visible;
  226. }
  227. table th,
  228. table td {
  229. border-bottom: 1px solid var(--color-border);
  230. text-align: left;
  231. font-weight: normal;
  232. }
  233. table td {
  234. padding: 0 15px;
  235. font-style: normal;
  236. background-position: 8px center;
  237. background-repeat: no-repeat;
  238. }
  239. table th#headerName {
  240. position: relative;
  241. width: 9999px; /* not really sure why this works better than 100% … table styling */
  242. padding: 0;
  243. }
  244. #headerName-container {
  245. position: relative;
  246. height: 50px;
  247. }
  248. table th#headerSize, table td.filesize {
  249. text-align: right;
  250. }
  251. table th#headerDate, table td.date,
  252. table th.column-last, table td.column-last {
  253. -moz-box-sizing: border-box;
  254. box-sizing: border-box;
  255. position: relative;
  256. /* this can not be just width, both need to be set … table styling */
  257. min-width: 130px;
  258. max-width: 130px;
  259. }
  260. /* Multiselect bar */
  261. table.multiselect thead {
  262. @include position('sticky');
  263. top: 94px;
  264. z-index: 55;
  265. -moz-box-sizing: border-box;
  266. box-sizing: border-box;
  267. left: $navigation-width;
  268. }
  269. table.multiselect thead th {
  270. background-color: var(--color-main-background-translucent);
  271. font-weight: bold;
  272. }
  273. #app-content.with-app-sidebar table.multiselect thead{
  274. margin-right: 27%;
  275. }
  276. table.multiselect #headerName {
  277. position: relative;
  278. width: 9999px; /* when we use 100%, the styling breaks on mobile … table styling */
  279. }
  280. table.multiselect #modified {
  281. display: none;
  282. }
  283. table td.selection,
  284. table th.selection,
  285. table td.fileaction {
  286. width: 32px;
  287. text-align: center;
  288. }
  289. table td.filename a.name,
  290. table td.filename p.name {
  291. display: flex;
  292. position:relative; /* Firefox needs to explicitly have this default set … */
  293. -moz-box-sizing: border-box;
  294. box-sizing: border-box;
  295. height: 50px;
  296. line-height: 50px;
  297. padding: 0;
  298. }
  299. table td.filename .thumbnail-wrapper {
  300. /* we need this to make sure flex is working inside a table cell */
  301. width: 0;
  302. min-width: 50px;
  303. max-width: 50px;
  304. height: 50px;
  305. }
  306. table td.filename .thumbnail-wrapper.icon-loading-small {
  307. &:after {
  308. z-index: 10;
  309. }
  310. .thumbnail {
  311. opacity: 0.2;
  312. }
  313. }
  314. table td.filename .thumbnail {
  315. display: inline-block;
  316. width: 32px;
  317. height: 32px;
  318. background-size: 32px;
  319. margin-left: 9px;
  320. margin-top: 9px;
  321. border-radius: var(--border-radius);
  322. cursor: pointer;
  323. position: absolute;
  324. z-index: 4;
  325. }
  326. table td.filename p.name .thumbnail {
  327. cursor: default;
  328. }
  329. // Show slight border around previews for images, txt, etc.
  330. table tr[data-has-preview='true'] .thumbnail {
  331. border: 1px solid var(--color-border);
  332. }
  333. table td.filename input.filename {
  334. width: 70%;
  335. margin-left: 48px;
  336. cursor: text;
  337. }
  338. table td.filename form {
  339. margin-top: -40px;
  340. position: relative;
  341. top: -6px;
  342. }
  343. table td.filename a, table td.login, table td.logout, table td.download, table td.upload, table td.create, table td.delete { padding:3px 8px 8px 3px; }
  344. table td.filename .nametext, .modified, .column-last>span:first-child { float:left; padding:15px 0; }
  345. .modified, .column-last>span:first-child {
  346. position: relative;
  347. overflow: hidden;
  348. text-overflow: ellipsis;
  349. width: 110px;
  350. }
  351. /* TODO fix usability bug (accidental file/folder selection) */
  352. table {
  353. td.filename {
  354. max-width: 0;
  355. .nametext {
  356. width: 0;
  357. flex-grow: 1;
  358. display: flex;
  359. padding: 0;
  360. overflow: hidden;
  361. white-space: nowrap;
  362. text-overflow: ellipsis;
  363. height: 100%;
  364. z-index: 10;
  365. padding-right: 20px;
  366. }
  367. }
  368. .uploadtext {
  369. position: absolute;
  370. left: 55px;
  371. }
  372. }
  373. .hide-hidden-files #filestable #fileList tr.hidden-file,
  374. .hide-hidden-files #filestable #fileList tr.hidden-file.dragging {
  375. display: none;
  376. }
  377. #fileList tr.animate-opacity {
  378. -webkit-transition:opacity 250ms;
  379. -moz-transition:opacity 250ms;
  380. -o-transition:opacity 250ms;
  381. transition:opacity 250ms;
  382. }
  383. #fileList tr.dragging {
  384. opacity: 0.2;
  385. }
  386. table td.filename .nametext .innernametext {
  387. text-overflow: ellipsis;
  388. overflow: hidden;
  389. position: relative;
  390. vertical-align: top;
  391. }
  392. /* for smaller resolutions - see mobile.css */
  393. table td.filename .uploadtext {
  394. font-weight: normal;
  395. margin-left: 55px;
  396. margin-top: 5px;
  397. height: 20px;
  398. padding: 10px 0;
  399. font-size: 11px;
  400. opacity: .5;
  401. }
  402. table td.selection {
  403. padding: 0;
  404. }
  405. /* File checkboxes */
  406. #fileList tr td.selection>.selectCheckBox + label:before {
  407. opacity: 0.3;
  408. margin-right: 0;
  409. }
  410. /* Show checkbox with full opacity when hovering, checked, or selected */
  411. #fileList tr:hover td.selection>.selectCheckBox + label:before,
  412. #fileList tr:focus td.selection>.selectCheckBox + label:before,
  413. #fileList tr td.selection>.selectCheckBox:checked + label:before,
  414. #fileList tr.selected td.selection>.selectCheckBox + label:before {
  415. opacity: 1;
  416. }
  417. /* Show checkbox with half opacity when selecting range */
  418. #fileList tr.halfselected td.selection>.selectCheckBox + label:before {
  419. opacity: 0.5;
  420. }
  421. /* Use label to have bigger clickable size for checkbox */
  422. #fileList tr td.selection>.selectCheckBox + label,
  423. .select-all + label {
  424. padding: 16px;
  425. }
  426. #fileList tr td.filename {
  427. position: relative;
  428. width: 100%;
  429. padding-left: 0;
  430. padding-right:0;
  431. -webkit-transition:background-image 500ms; -moz-transition:background-image 500ms; -o-transition:background-image 500ms; transition:background-image 500ms;
  432. }
  433. #fileList tr td.filename a.name label,
  434. #fileList tr td.filename p.name label {
  435. position: absolute;
  436. width: 80%;
  437. height: 50px;
  438. }
  439. #fileList tr td.filename .favorite {
  440. display: inline-block;
  441. float: left;
  442. }
  443. #fileList tr td.filename .favorite-mark {
  444. position: absolute;
  445. display: block;
  446. top: -6px;
  447. right: -6px;
  448. line-height: 100%;
  449. text-align: center;
  450. }
  451. #uploadsize-message,#delete-confirm { display:none; }
  452. /* File actions */
  453. .fileactions {
  454. z-index: 50;
  455. }
  456. .busy .fileactions, .busy .action {
  457. visibility: hidden;
  458. }
  459. /* fix position of bubble pointer for Files app */
  460. .bubble,
  461. #app-navigation .app-navigation-entry-menu {
  462. border-top-right-radius: 3px;
  463. min-width: 100px;
  464. }
  465. /* force show the loading icon, not only on hover */
  466. #fileList .icon-loading-small {
  467. opacity: 1 !important;
  468. display: inline !important;
  469. }
  470. #fileList .action.action-share-notification span, #fileList a.name {
  471. cursor: default !important;
  472. }
  473. a.action > img {
  474. height: 16px;
  475. width: 16px;
  476. vertical-align: text-bottom;
  477. }
  478. /* Actions for selected files */
  479. .selectedActions {
  480. position: relative;
  481. display: inline-block;
  482. vertical-align: middle;
  483. }
  484. .selectedActions.hidden {
  485. display: none;
  486. }
  487. .selectedActions a {
  488. display: inline;
  489. line-height: 50px;
  490. padding: 16px 5px;
  491. }
  492. .selectedActions a.hidden {
  493. display: none;
  494. }
  495. .selectedActions a img {
  496. position:relative;
  497. vertical-align: text-bottom;
  498. margin-bottom: -1px;
  499. }
  500. .selectedActions .actions-selected .icon-more {
  501. margin-top: -3px;
  502. }
  503. #fileList td a {
  504. a.action {
  505. display: inline;
  506. padding: 17px 8px;
  507. line-height: 50px;
  508. opacity: .3;
  509. &.action-share {
  510. padding: 17px 14px;
  511. &.permanent:not(.shared-style) .icon-shared + span {
  512. /* hide text of the share action */
  513. /* .hidden-visually for accessbility */
  514. position: absolute;
  515. left:-10000px;
  516. top: auto;
  517. width: 1px;
  518. height: 1px;
  519. overflow: hidden;
  520. }
  521. .avatar {
  522. display: inline-block;
  523. vertical-align: middle;
  524. }
  525. }
  526. &.action-menu {
  527. padding-top: 17px;
  528. padding-bottom: 17px;
  529. padding-left: 14px;
  530. padding-right: 14px;
  531. }
  532. &.no-permission {
  533. &:hover, &:focus {
  534. opacity: .3;
  535. }
  536. }
  537. &.disabled {
  538. &:hover, &:focus,
  539. img {
  540. opacity: .3;
  541. }
  542. &.action-download {
  543. opacity: .7;
  544. &:hover, &:focus {
  545. opacity: .7;
  546. }
  547. }
  548. }
  549. &:hover, &:focus {
  550. opacity: .7;
  551. }
  552. }
  553. .fileActionsMenu a.action, a.action.action-share.shared-style {
  554. opacity: .7;
  555. }
  556. }
  557. // Ellipsize long sharer names
  558. #fileList .action.action-share.permanent.shared-style span:not(.icon) {
  559. display: inline-block;
  560. max-width: 70px;
  561. overflow: hidden;
  562. text-overflow: ellipsis;
  563. vertical-align: middle;
  564. margin-left: 6px;
  565. }
  566. #fileList .remoteAddress .userDomain {
  567. margin-left: 0 !important;
  568. }
  569. #fileList .favorite-mark.permanent {
  570. opacity: 1;
  571. }
  572. #fileList .fileActionsMenu a.action:hover,
  573. #fileList .fileActionsMenu a.action:focus,
  574. /* show share action of shared items darker to distinguish from non-shared */
  575. #fileList a.action.action-share.shared-style:hover,
  576. #fileList a.action.action-share.shared-style:focus {
  577. opacity: 1;
  578. }
  579. #fileList tr a.action.disabled {
  580. background: none;
  581. }
  582. #selectedActionsList a.download.disabled,
  583. #fileList tr a.action.action-download.disabled {
  584. color: #000000;
  585. }
  586. #fileList tr:hover a.action.disabled:hover * {
  587. cursor: default;
  588. }
  589. .summary {
  590. opacity: .3;
  591. /* add whitespace to bottom of files list to correctly show dropdowns */
  592. height: 250px;
  593. }
  594. /* Less whitespace needed on link share page
  595. * as there is a footer and action menus have fewer entries.
  596. */
  597. #body-public .summary {
  598. height: 180px;
  599. }
  600. .summary:hover,
  601. .summary:focus,
  602. .summary,
  603. table tr.summary td {
  604. background-color: transparent;
  605. }
  606. .summary td {
  607. border-bottom: none;
  608. vertical-align: top;
  609. padding-top: 20px;
  610. }
  611. .summary .info {
  612. margin-left: 2px;
  613. }
  614. .hiddeninfo {
  615. white-space: pre-line;
  616. }
  617. table.dragshadow {
  618. width:auto;
  619. z-index: 2000;
  620. }
  621. table.dragshadow td.filename {
  622. padding-left:60px;
  623. padding-right:16px;
  624. height: 36px;
  625. /* Override "max-width: 0" to prevent file name and size from overlapping */
  626. max-width: unset;
  627. }
  628. table.dragshadow td.size {
  629. padding-right:8px;
  630. }
  631. .mask {
  632. z-index: 50;
  633. position: absolute;
  634. top: 0;
  635. left: 0;
  636. right: 0;
  637. bottom: 0;
  638. background-color: var(--color-main-background);
  639. background-repeat: no-repeat no-repeat;
  640. background-position: 50%;
  641. opacity: 0.7;
  642. transition: opacity 100ms;
  643. -moz-transition: opacity 100ms;
  644. -o-transition: opacity 100ms;
  645. -ms-transition: opacity 100ms;
  646. -webkit-transition: opacity 100ms;
  647. }
  648. .mask.transparent{
  649. opacity: 0;
  650. }
  651. .newFileMenu {
  652. font-weight: 300;
  653. top: 100%;
  654. margin-top: 4px;
  655. min-width: 100px;
  656. margin-left: 22px; /* Align left edge below center of + button … */
  657. transform: translateX(-50%); /* … then center it below button */
  658. z-index: 1001;
  659. /* Center triangle */
  660. &::after {
  661. left: calc(50% - 8px) !important;
  662. }
  663. }
  664. #filestable .filename .action .icon,
  665. #filestable .selectedActions a .icon,
  666. #filestable .filename .favorite-mark .icon,
  667. #controls .actions .button .icon {
  668. display: inline-block;
  669. vertical-align: middle;
  670. background-size: 16px 16px;
  671. }
  672. #filestable .filename .favorite-mark {
  673. // Override default icons to always hide the star icon and always show the
  674. // starred icon even when hovered or focused.
  675. & .icon-star {
  676. background-image: none;
  677. }
  678. & .icon-starred {
  679. @include icon-color('star-dark', 'actions', $color-yellow, 1, true);
  680. }
  681. }
  682. #filestable .filename .action .icon.hidden,
  683. #filestable .selectedActions a .icon.hidden,
  684. #controls .actions .button .icon.hidden {
  685. display: none;
  686. }
  687. #filestable .filename .action .icon.loading,
  688. #filestable .selectedActions a .icon.loading,
  689. #controls .actions .button .icon.loading {
  690. width: 15px;
  691. height: 15px;
  692. }
  693. .app-files .actions .button.new {
  694. position: relative;
  695. }
  696. .breadcrumb .canDrop > a,
  697. #filestable tbody tr.canDrop {
  698. background-color: rgba( $color-primary, .3 );
  699. }
  700. .dropzone-background {
  701. background-color: rgba( $color-primary, .3 );
  702. :hover{
  703. box-shadow: none !important;
  704. }
  705. }
  706. #quota {
  707. margin: 0 !important;
  708. border: none;
  709. border-radius: 0;
  710. background-color: transparent;
  711. z-index:1;
  712. > a[href='#'] {
  713. // if no link is set, no mouse feedback
  714. box-shadow: none !important;
  715. &, * {
  716. cursor: default !important;
  717. }
  718. }
  719. .quota-container {
  720. height: 5px;
  721. border-radius: var(--border-radius);
  722. div {
  723. height: 100%;
  724. background-color: var(--color-primary);
  725. }
  726. }
  727. }
  728. #quotatext {
  729. padding: 0;
  730. height: 30px;
  731. line-height: 30px;
  732. }
  733. /* GRID */
  734. #filestable.view-grid:not(.hidden) {
  735. $grid-size: 160px;
  736. $grid-pad: 14px;
  737. /* HEADER and MULTISELECT */
  738. thead {
  739. tr {
  740. display: block;
  741. border-bottom: 1px solid var(--color-border);
  742. background-color: var(--color-main-background-translucent);
  743. th {
  744. width: auto;
  745. border: none;
  746. }
  747. }
  748. }
  749. /* MAIN FILE LIST */
  750. tbody {
  751. display: grid;
  752. grid-template-columns: repeat(auto-fill, $grid-size);
  753. justify-content: space-around;
  754. row-gap: 15px;
  755. margin: 15px 0;
  756. // ensure search still filters tr with .hidden
  757. tr:not(.hidden) {
  758. display: block;
  759. position: relative;
  760. height: $grid-size + 44px - $grid-pad;
  761. border-radius: var(--border-radius);
  762. &:hover, &:focus, &:active,
  763. &.selected,
  764. &.searchresult,
  765. .name:focus,
  766. &.highlighted {
  767. background-color: transparent;
  768. .thumbnail-wrapper,
  769. .nametext,
  770. .fileactions {
  771. transition: background-color 0.3s ease;
  772. background-color: var(--color-background-dark);
  773. }
  774. }
  775. }
  776. td {
  777. display: inline;
  778. border-bottom: none;
  779. &.filename {
  780. .thumbnail-wrapper {
  781. min-width: 0;
  782. max-width: none;
  783. position: absolute;
  784. width: $grid-size;
  785. height: $grid-size;
  786. padding: $grid-pad; // same as action icon bottom and right padding
  787. top: 0;
  788. left: 0;
  789. z-index: -1; // make sure the default click is the link
  790. .thumbnail {
  791. width: calc(100% - 2 * #{$grid-pad});
  792. height: calc(100% - 2 * #{$grid-pad}); //action icon padding
  793. background-size: contain;
  794. margin: 0;
  795. border-radius: var(--border-radius);
  796. background-repeat: no-repeat;
  797. background-position: center;
  798. /* Position favorite star related to checkbox to left and 3-dot menu below
  799. * Position is inherited from the selection while in grid view
  800. */
  801. .favorite-mark {
  802. padding: $grid-pad;
  803. left: auto;
  804. top: -22px; // center in corner of thumbnail
  805. right: -22px; // center in corner of thumbnail
  806. }
  807. }
  808. }
  809. .name {
  810. height: 100%;
  811. border-radius: var(--border-radius);
  812. // since we're using thumbnail, name and actions bg
  813. // we need to hide the overflow for the radius to show
  814. // luckily the popovermenu is outside .name
  815. overflow: hidden;
  816. // we but the thumbnail in background to ensure
  817. // the name is the default click handler
  818. // force back the cursor which have been overrided
  819. // and disabled for some reason...
  820. cursor: pointer !important;
  821. .nametext {
  822. display: flex;
  823. height: 44px;
  824. margin-top: $grid-size - $grid-pad;
  825. text-align: center;
  826. line-height: 44px;
  827. padding: 0;
  828. .innernametext {
  829. display: inline-block;
  830. text-align: center;
  831. overflow: hidden;
  832. text-overflow: ellipsis;
  833. white-space: nowrap;
  834. }
  835. &:before {
  836. content: '';
  837. flex: 1;
  838. min-width: 14px;
  839. }
  840. &:after {
  841. content: '';
  842. flex: 1;
  843. min-width: 44px;
  844. }
  845. /* No space for extension in grid view */
  846. .extension {
  847. display: none;
  848. }
  849. }
  850. .fileactions {
  851. height: initial;
  852. margin-top: $grid-size - $grid-pad;
  853. display: flex;
  854. align-items: center;
  855. position: absolute;
  856. right: 0;
  857. .action {
  858. padding: $grid-pad;
  859. width: 44px;
  860. height: 44px;
  861. display: flex;
  862. align-items: center;
  863. justify-content: center;
  864. // hide all actions in grid view that are not the menu
  865. &:not(.action-menu) {
  866. display: none;
  867. }
  868. }
  869. }
  870. }
  871. .fileActionsMenu {
  872. // force show the sharing entry in the dropdown menu
  873. .action-share-container.hidden {
  874. display: block !important;
  875. // avatar in shared by user dropdown menu
  876. .action-share img {
  877. padding: 6px;
  878. border-radius: 50%;
  879. }
  880. }
  881. // force show the sharing entry in the dropdown menu
  882. .action-restore-container.hidden {
  883. display: block !important;
  884. }
  885. // force show the sharing entry in the dropdown menu
  886. .action-comment-container.hidden {
  887. display: block !important;
  888. }
  889. }
  890. form {
  891. padding: 3px 14px;
  892. border-radius: var(--border-radius);
  893. input.filename {
  894. width: 100%;
  895. margin-left: 0;
  896. }
  897. }
  898. }
  899. /* No space for filesize and date in grid view */
  900. &.filesize,
  901. &.date {
  902. display: none;
  903. }
  904. &.selection,
  905. &.filename .favorite-mark {
  906. position: absolute;
  907. top: -8px; // half the checkbox width, center on corner of thumbnail
  908. left: -8px; // half the checkbox width, center on corner of thumbnail
  909. display: flex;
  910. width: 44px;
  911. height: 44px;
  912. z-index: 10;
  913. background: transparent;
  914. label {
  915. width: 44px;
  916. height: 44px;
  917. display: inline-flex;
  918. padding: $grid-pad; // like any action icon
  919. &::before {
  920. margin: 0;
  921. width: $grid-pad; // 16px - border
  922. height: $grid-pad; // 16px - border
  923. }
  924. }
  925. }
  926. /* Position actions menu below file */
  927. .popovermenu {
  928. left: 0;
  929. width: $grid-size - 10px; // 2 * margin
  930. margin: 0 5px;
  931. /* Ellipsize long entries, normally menu width is adjusted but for grid we use fixed width. */
  932. .menuitem span:not(.icon) {
  933. overflow: hidden;
  934. text-overflow: ellipsis;
  935. }
  936. }
  937. }
  938. }
  939. tr.hidden-file td.filename .name .nametext .extension {
  940. display: block;
  941. }
  942. /* Center align the footer file number & size summary */
  943. tfoot {
  944. display: grid;
  945. .summary:not(.hidden) {
  946. display: inline-block;
  947. margin: 0 auto;
  948. td {
  949. padding-top: 50px;
  950. &:first-child,
  951. &.date {
  952. display: none;
  953. }
  954. .info {
  955. margin-left: 0;
  956. }
  957. }
  958. }
  959. }
  960. }
  961. /* Grid view toggle */
  962. #view-toggle {
  963. background-color: transparent;
  964. border: none;
  965. margin: 0;
  966. padding: 22px;
  967. opacity: .5;
  968. position: fixed;
  969. right: 0;
  970. z-index: 100;
  971. &:hover,
  972. &:focus,
  973. #showgridview:focus + & {
  974. opacity: 1;
  975. }
  976. }
  977. /**
  978. * Make sure the hidden input is always
  979. * on the visible scrolled area of the
  980. * page to avoid scrolling to top when focusing
  981. */
  982. #showgridview {
  983. position: fixed;
  984. top: 0;
  985. }
  986. /* Adjustments for link share page */
  987. #body-public {
  988. #filestable.view-grid:not(.hidden) tbody td {
  989. /* More space for filename since there is no share icon */
  990. &.filename .name .nametext .innernametext {
  991. max-width: 124px;
  992. }
  993. /* Position actions menu correctly below 3-dot-menu */
  994. .popovermenu {
  995. left: -80px;
  996. }
  997. }
  998. /* Right-align view toggle on link share page */
  999. #view-toggle {
  1000. position: absolute;
  1001. right: 0;
  1002. }
  1003. }
  1004. /* Hide legacy Gallery toggle */
  1005. #gallery-button {
  1006. display: none;
  1007. }