files.scss 23 KB

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