Skip to content

Commit

Permalink
style: Refactor simple table styles for better structure
Browse files Browse the repository at this point in the history
- Added a new class for handling "no data" rows.
- Moved all `td` and `th` styling inside the `tr` block for clarity.
- Kept existing text alignment rules but organized them better.
- Improved padding and color settings for empty states.
  • Loading branch information
jonrandahl committed Feb 25, 2025
1 parent 6251e70 commit ff89b85
Showing 1 changed file with 33 additions and 23 deletions.
56 changes: 33 additions & 23 deletions app/assets/stylesheets/_simple-tables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,38 @@
width: 100%;
background-color: white;

td {
text-align: right;
}

td:first-child {
text-align: left;
}

th {
text-align: center;
}

th.u-left {
text-align: left;
}

th.u-right {
text-align: right;
}

.u-row-odd {
background-color: $grey-3;
tr {
&.no-data {
td:first-child {
text-align: center;
padding: 0.5em;
color: $grey-2;
}
}

td {
text-align: right;
}

td:first-child {
text-align: left;
}

th {
text-align: center;
}

th.u-left {
text-align: left;
}

th.u-right {
text-align: right;
}

.u-row-odd {
background-color: $grey-3;
}
}
}

Expand All @@ -46,4 +56,4 @@
padding: 0.25em 0.25em 0.25em 0;
border-bottom: 1px solid $grey-3;
}
}
}

0 comments on commit ff89b85

Please sign in to comment.