From fcd6f5c7422e76e01707f6f9f8cc99d7367d1325 Mon Sep 17 00:00:00 2001 From: sinsong Date: Tue, 4 Jul 2023 15:17:51 +0800 Subject: [PATCH] add index table background pattern --- frontend/src/style/_variable.scss | 6 +++++- frontend/src/style/main.scss | 16 ++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/frontend/src/style/_variable.scss b/frontend/src/style/_variable.scss index f5409df..12ccf00 100644 --- a/frontend/src/style/_variable.scss +++ b/frontend/src/style/_variable.scss @@ -8,6 +8,8 @@ --box-bg: #ecf2f5; --index-thead-border: #000; + --index-item-bg1: #fff; + --index-item-bg2: #e4eeff; --index-item-hover: #ffd; --package-actions-box-bg: #eee; @@ -25,7 +27,9 @@ --box-bg: #212427; --index-thead-border: #fff; - --index-item-hover: #424242; + --index-item-bg1: #000; + --index-item-bg2: #1a1a1a; + --index-item-hover: rgb(75, 75, 6); --package-actions-box-bg: #222; --package-actions-box-border-color: #fff; diff --git a/frontend/src/style/main.scss b/frontend/src/style/main.scss index 5100f37..00f1cc7 100644 --- a/frontend/src/style/main.scss +++ b/frontend/src/style/main.scss @@ -63,16 +63,24 @@ table#index-table { } tbody { + tr { + &:nth-child(2n+1) { + background: var(--index-item-bg1); + } + &:nth-child(2n) { + background: var(--index-item-bg2); + } + &:hover { + background: var(--index-item-hover); + } + } + td { white-space: nowrap; } } } -tr.index-item:hover { - background: var(--index-item-hover); -} - // Components @import "root"; @import "nav";