Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions apps/files/src/components/FilesListVirtual.vue
Original file line number Diff line number Diff line change
Expand Up @@ -864,8 +864,8 @@ export default defineComponent({
.files-list--grid tbody.files-list__tbody {
--item-padding: 16px;
--icon-preview-size: 166px;
--name-height: 32px;
--mtime-height: 16px;
--name-height: var(--default-clickable-area);
--mtime-height: calc(var(--font-size-small) + var(--default-grid-baseline));
--row-width: calc(var(--icon-preview-size) + var(--item-padding) * 2);
--row-height: calc(var(--icon-preview-size) + var(--name-height) + var(--mtime-height) + var(--item-padding) * 2);
--checkbox-padding: 0px;
Expand Down Expand Up @@ -947,7 +947,7 @@ export default defineComponent({
.files-list__row-mtime {
width: var(--icon-preview-size);
height: var(--mtime-height);
font-size: calc(var(--default-font-size) - 4px);
font-size: var(--font-size-small);
}

.files-list__row-actions {
Expand All @@ -958,4 +958,21 @@ export default defineComponent({
height: var(--clickable-area);
}
}

@media screen and (max-width: 768px) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot use vars in here, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No that is not possible for media queries. We need to wait for: https://drafts.csswg.org/css-env-1/

Otherwise classes are the way to go, e.g. setting standardized classes on the body using some core JS script, for example: body.viewport-extra-small, body.viewport-small, body.viewport-medium, body.viewport-large

// there is no mtime
.files-list--grid tbody.files-list__tbody {
--mtime-height: 0px;

// so we move the action to the name
.files-list__row-actions {
inset-block-end: var(--item-padding);
}

// and we need to keep space on the name for the actions
.files-list__row-name-text {
padding-inline-end: var(--clickable-area) !important;
}
}
}
</style>
2 changes: 0 additions & 2 deletions cypress/e2e/files/scrolling.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,7 @@ describe('files: Scrolling to selected file in file list (GRID MODE)', { testIso
.and(beOverlappedByTableHeader)
}

// see footer is only shown partly
cy.get('tfoot')
.should(notBeFullyInViewport)
.contains('span', '12 files')
.should('be.visible')
})
Expand Down
4 changes: 2 additions & 2 deletions dist/files-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-main.js.map

Large diffs are not rendered by default.

Loading