From ff89b858557ad58dec6ce6aa322aeb269ff2ceab Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Tue, 25 Feb 2025 12:20:15 +0000 Subject: [PATCH] style: Refactor simple table styles for better structure - 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. --- app/assets/stylesheets/_simple-tables.scss | 56 +++++++++++++--------- 1 file changed, 33 insertions(+), 23 deletions(-) diff --git a/app/assets/stylesheets/_simple-tables.scss b/app/assets/stylesheets/_simple-tables.scss index d73f5911..adb6e91c 100644 --- a/app/assets/stylesheets/_simple-tables.scss +++ b/app/assets/stylesheets/_simple-tables.scss @@ -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; + } } } @@ -46,4 +56,4 @@ padding: 0.25em 0.25em 0.25em 0; border-bottom: 1px solid $grey-3; } -} \ No newline at end of file +}