Skip to content

Commit

Permalink
fix: make responsive behavior of table depend on it's own width
Browse files Browse the repository at this point in the history
  • Loading branch information
czosel committed Nov 15, 2024
1 parent 356446e commit ee58021
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion addon/components/document-list.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<thead>
<tr>
{{#each-in @columns as |key settings|}}
<th class={{concat (if (eq key "title") "uk-table-expand") (concat "document-list-item-" key)}}>
<th class={{concat "uk-text-nowrap" (if (eq key "title") " uk-table-expand") (concat " document-list-item-" key)}}>
{{#if settings.labelHidden}}
<span hidden>
{{t (concat "alexandria.document-list." settings.label)}}
Expand Down
19 changes: 17 additions & 2 deletions app/styles/_responsive.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
.alexandria-container {
container: alexandria / inline-size;
}
.document-view {
container: table / inline-size;
}

@container alexandria (max-width: 1200px) {
@container alexandria (max-width: 1550px) {
.document-details {
width: 300px;

Expand All @@ -12,7 +15,13 @@
}
}

@container alexandria (max-width: 1100px) {
@container table (max-width: 700px) {
.document-list-item-createdByUser {
display: none;
}
}

@container table (max-width: 850px) {
.side-nav > div:first-child {
font-size: 0;
}
Expand Down Expand Up @@ -48,3 +57,9 @@
}
}
}

@container table (max-width: 900px) {
.document-list-item-modifiedAt {
display: none;
}
}

0 comments on commit ee58021

Please sign in to comment.