From 817e39650e0b203ded088ab83ca2865f5ca9d3a8 Mon Sep 17 00:00:00 2001 From: Sahil Batra Date: Mon, 24 Jul 2023 21:49:58 +0530 Subject: [PATCH] css: Re-add bootstrap CSS defined using "table" class. This commit re-adds bootstrap CSS rules defined using "table" class to the specific CSS files where CSS for different tables is present. This is a prep commit for removing table related bootstrap CSS from bootstrap.css. --- web/styles/app_components.css | 18 ++++++++++++++++++ web/styles/dark_theme.css | 3 ++- web/styles/portico/activity.css | 31 +++++++++++++++++++++---------- web/styles/portico/portico.css | 14 ++++++++++++++ web/styles/recent_topics.css | 10 ++++++++++ 5 files changed, 65 insertions(+), 11 deletions(-) diff --git a/web/styles/app_components.css b/web/styles/app_components.css index 21ed220842..63b02c6429 100644 --- a/web/styles/app_components.css +++ b/web/styles/app_components.css @@ -698,6 +698,8 @@ div.overlay { table-layout: auto; border-collapse: separate; border-spacing: 0; + margin-bottom: 20px; + width: 100%; &:not(.table-bordered) thead th { border-top: 1px solid hsl(0deg 0% 0% / 20%) !important; @@ -754,6 +756,14 @@ div.overlay { td { padding: 4px 5px; } + + & th { + text-align: left; + } + + & td { + border-top: 1px solid hsl(0deg 0% 87%); + } } .table-bordered { @@ -762,11 +772,19 @@ div.overlay { border-left: 0; border-radius: 4px; border-spacing: 0; + width: 100%; + margin-bottom: 20px; & th, td { border-left: 1px solid hsl(0deg 0% 87%); + border-top: 1px solid hsl(0deg 0% 87%); padding: 4px 5px; + text-align: left; + } + + thead tr:first-child th { + border-top: 0; } thead tr:first-child > th:first-child { diff --git a/web/styles/dark_theme.css b/web/styles/dark_theme.css index 771c490089..a4d9dd77c5 100644 --- a/web/styles/dark_theme.css +++ b/web/styles/dark_theme.css @@ -921,7 +921,8 @@ #settings_page .sidebar-wrapper *, table, table th, - table td { + table td, + #recent_topics_table table td { border-color: hsl(0deg 0% 0% / 20%); } diff --git a/web/styles/portico/activity.css b/web/styles/portico/activity.css index e0366b350a..686c740c31 100644 --- a/web/styles/portico/activity.css +++ b/web/styles/portico/activity.css @@ -2,12 +2,6 @@ background-color: hsl(208deg 100% 97%); } -.table td { - padding-top: 2px; - padding-bottom: 2px; - white-space: nowrap; -} - .table-striped { & tr.recently_active { & td { @@ -20,10 +14,6 @@ } } -td.number { - text-align: right; -} - .summary-table, .analytics_table { border: 1px solid hsl(0deg 0% 87%); @@ -31,10 +21,27 @@ td.number { border-left: 0; border-radius: 4px; border-spacing: 0; + width: 100%; & th, td { border-left: 1px solid hsl(0deg 0% 87%); + text-align: left; + + &.number { + text-align: right; + } + } + + th { + vertical-align: bottom; + padding: 8px; + } + + td { + border-top: 1px solid hsl(0deg 0% 87%); + white-space: nowrap; + padding: 2px 8px; } tbody > tr:nth-child(odd) > td { @@ -56,6 +63,10 @@ td.number { tbody tr:last-child > td:last-child { border-bottom-right-radius: 4px; } + + thead tr:first-child th { + border-top: 0; + } } .summary-table { diff --git a/web/styles/portico/portico.css b/web/styles/portico/portico.css index 6d550dd0c3..97ba941bf1 100644 --- a/web/styles/portico/portico.css +++ b/web/styles/portico/portico.css @@ -567,6 +567,20 @@ input.text-error { box-shadow: 0 0 4px hsl(0deg 0% 0% / 10%); border-collapse: collapse; + margin-bottom: 20px; + + thead tr:first-child th { + border-top: 0; + } + + & th, + td { + padding: 8px; + line-height: 20px; + text-align: left; + vertical-align: top; + border-top: 1px solid hsl(0deg 0% 87%); + } tbody > tr:nth-child(odd) > td { background-color: hsl(0deg 0% 98%); diff --git a/web/styles/recent_topics.css b/web/styles/recent_topics.css index 0f8d50ab89..5e3b78939a 100644 --- a/web/styles/recent_topics.css +++ b/web/styles/recent_topics.css @@ -93,6 +93,16 @@ */ margin-bottom: var(--max-unexpanded-compose-height); border-spacing: 0; + width: 100%; + + th { + padding: 8px; + text-align: left; + } + + td { + border-top: 1px solid hsl(0deg 0% 87%); + } } #recent_topics_filter_buttons {