Skip to content

Commit

Permalink
web: better cell header and content alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
dgdavid committed Mar 15, 2024
1 parent 7001599 commit 34342ba
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
10 changes: 8 additions & 2 deletions web/src/assets/styles/blocks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,10 @@ table[data-type="agama/tree-table"] {
padding-inline-end: var(--spacer-normal);
}

th.fit-content {
min-width: fit-content;
}

/**
* Temporary PF/Table overrides for small devices
**/
Expand Down Expand Up @@ -497,12 +501,14 @@ table.proposal-result {
}

tbody th .pf-v5-c-table__tree-view-main {
padding-inline-start: 0;
padding-inline-start: var(--pf-v5-c-table--m-compact--cell--first-last-child--PaddingLeft);
cursor: auto;
}

tbody tr[aria-level="2"] th .pf-v5-c-table__tree-view-main {
padding-inline-start: var(--spacer-large);
padding-inline-start: calc(
var(--pf-v5-c-table--m-compact--cell--first-last-child--PaddingLeft) + var(--spacer-large)
);
}
/** End of temporary hack */

Expand Down
4 changes: 0 additions & 4 deletions web/src/assets/styles/utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@
border: none;
}

.fit-content {
min-width: fit-content;
}

.plain-button {
border: none;
background: none;
Expand Down
4 changes: 2 additions & 2 deletions web/src/components/storage/ProposalResultSection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ const DevicesTreeTable = ({ devicesManager }) => {
return (
<TreeTable
columns={[
{ title: _("Device"), content: renderDeviceName, classNames: "fit-content" },
{ title: _("Device"), content: renderDeviceName },
{ title: _("Mount Point"), content: renderMountPoint, classNames: "fit-content" },
{ title: _("Details"), content: renderDetails, classNames: "details-column fit-content" },
{ title: _("Details"), content: renderDetails, classNames: "details-column" },
{ title: _("Size"), content: renderSize, classNames: "sizes-column" }
]}
items={devicesManager.usedDevices()}
Expand Down

0 comments on commit 34342ba

Please sign in to comment.