From 2e2b153b610543e058f771ceb336ce7319d59f2c Mon Sep 17 00:00:00 2001 From: Xiao Yijun Date: Mon, 30 Jan 2023 13:16:57 +0800 Subject: [PATCH] refactor(console): remove deprecated table styles (#2991) --- .../PermissionsTable/index.module.scss | 6 --- .../src/components/Table/index.module.scss | 3 ++ .../RoleDetails/RoleUsers/index.module.scss | 1 - .../UserDetails/UserRoles/index.module.scss | 6 --- packages/console/src/scss/normalized.scss | 25 ---------- packages/console/src/scss/table.module.scss | 46 ------------------- 6 files changed, 3 insertions(+), 84 deletions(-) delete mode 100644 packages/console/src/scss/table.module.scss diff --git a/packages/console/src/components/PermissionsTable/index.module.scss b/packages/console/src/components/PermissionsTable/index.module.scss index 34ca6eca1..98167519a 100644 --- a/packages/console/src/components/PermissionsTable/index.module.scss +++ b/packages/console/src/components/PermissionsTable/index.module.scss @@ -15,12 +15,6 @@ } } - tbody { - td { - font: var(--font-body-medium); - } - } - .name { display: inline-block; max-width: 100%; diff --git a/packages/console/src/components/Table/index.module.scss b/packages/console/src/components/Table/index.module.scss index f31800843..5865dcdd1 100644 --- a/packages/console/src/components/Table/index.module.scss +++ b/packages/console/src/components/Table/index.module.scss @@ -25,6 +25,9 @@ table { border: none; + border-spacing: 0; + table-layout: fixed; + width: 100%; } .headerTable { diff --git a/packages/console/src/pages/RoleDetails/RoleUsers/index.module.scss b/packages/console/src/pages/RoleDetails/RoleUsers/index.module.scss index 22859c077..f008daa3e 100644 --- a/packages/console/src/pages/RoleDetails/RoleUsers/index.module.scss +++ b/packages/console/src/pages/RoleDetails/RoleUsers/index.module.scss @@ -15,7 +15,6 @@ td { max-width: 100%; @include _.text-ellipsis; - font: var(--font-body-medium); } } diff --git a/packages/console/src/pages/UserDetails/UserRoles/index.module.scss b/packages/console/src/pages/UserDetails/UserRoles/index.module.scss index f6f5ebd05..bea6d6132 100644 --- a/packages/console/src/pages/UserDetails/UserRoles/index.module.scss +++ b/packages/console/src/pages/UserDetails/UserRoles/index.module.scss @@ -15,12 +15,6 @@ } } - tbody { - td { - font: var(--font-body-medium); - } - } - .name { display: block; @include _.text-ellipsis; diff --git a/packages/console/src/scss/normalized.scss b/packages/console/src/scss/normalized.scss index 6100ddfa9..b1f99134a 100644 --- a/packages/console/src/scss/normalized.scss +++ b/packages/console/src/scss/normalized.scss @@ -20,31 +20,6 @@ input { outline: none; } -table { - border: 1px solid var(--color-divider); - border-spacing: 0; - width: 100%; - table-layout: fixed; - - thead { - th { - font: var(--font-subhead-2); - color: var(--color-text); - padding: _.unit(3); - border-bottom: 1px solid var(--color-divider); - text-align: left; - } - } - - tbody { - td { - font: var(--font-body-medium); - border-bottom: 1px solid var(--color-divider); - padding: _.unit(3); - } - } -} - ::-webkit-scrollbar { width: 16px; } diff --git a/packages/console/src/scss/table.module.scss b/packages/console/src/scss/table.module.scss deleted file mode 100644 index 16f1737df..000000000 --- a/packages/console/src/scss/table.module.scss +++ /dev/null @@ -1,46 +0,0 @@ -@use '@/scss/underscore' as _; - -.base { - box-shadow: var(--shadow-1); -} - -tr.clickable { - cursor: pointer; - - &:hover { - background: var(--color-hover); - } -} - -.scrollable { - max-height: 100%; - background-color: var(--color-layer-1); - border-radius: 12px; - overflow-y: auto; - padding-bottom: _.unit(2); - - table { - border: none; - box-shadow: none; - - thead { - background: var(--color-layer-1); - position: sticky; - top: 0; - } - - tbody { - tr { - &:last-child { - td { - border-bottom: unset; - } - } - } - } - } -} - -.empty { - height: 100%; -}