cccjc commited on
Commit
e76973a
1 Parent(s): fe262ce

further fix dark mode styles

Browse files
Files changed (1) hide show
  1. static/css/style.css +51 -63
static/css/style.css CHANGED
@@ -1,111 +1,99 @@
1
- .custom-dataframe {
2
- width: 100% !important;
3
- overflow-x: auto !important;
4
- }
5
-
6
- .custom-dataframe table {
7
- width: auto !important;
8
- min-width: 100% !important;
9
- font-size: 14px !important;
 
10
  }
11
 
12
- .custom-dataframe thead th {
13
- padding: 4px 8px !important;
14
- text-align: center !important;
15
- vertical-align: middle !important;
16
- white-space: nowrap !important;
17
- overflow: visible !important;
18
- font-size: 12px !important;
19
- font-weight: bold !important;
20
- line-height: 1.2 !important;
 
 
 
21
  }
22
 
23
- .custom-dataframe tbody td {
24
- padding: 4px 8px !important;
25
- text-align: right !important;
26
- vertical-align: middle !important;
27
- white-space: nowrap !important;
28
- overflow: visible !important;
29
- line-height: 1.2 !important;
30
  }
31
 
32
- .custom-dataframe tbody td:first-child {
33
- text-align: left !important;
 
34
  }
35
 
36
- /* Adjust the sort indicator position */
37
- .custom-dataframe thead th::after {
38
- font-size: 12px !important;
39
- line-height: 1 !important;
40
- margin-left: 4px !important;
41
  }
42
 
43
- /* Style for global result columns */
44
  .custom-dataframe thead th:nth-child(-n+4),
45
  .custom-dataframe tbody td:nth-child(-n+4) {
46
- background-color: #f0f8ff !important; /* Light blue background */
47
  }
48
 
49
- /* Style for dimension-specific result columns */
50
  .custom-dataframe thead th:nth-child(n+5),
51
  .custom-dataframe tbody td:nth-child(n+5) {
52
- background-color: #f0fff0 !important; /* Light green background */
53
  }
54
 
55
- /* Alternating row colors for better readability */
56
  .custom-dataframe tbody tr:nth-child(even) td:nth-child(-n+4) {
57
- background-color: #e6f3ff !important; /* Slightly darker light blue */
58
  }
59
 
60
  .custom-dataframe tbody tr:nth-child(even) td:nth-child(n+5) {
61
- background-color: #e6ffe6 !important; /* Slightly darker light green */
62
  }
63
 
64
- /* Dark mode specific styles */
65
  @media (prefers-color-scheme: dark) {
66
  .custom-dataframe {
67
- color: #e0e0e0;
68
- background-color: #1a1a1a;
69
- }
70
-
71
- .custom-dataframe table {
72
- background-color: #2a2a2a;
73
- border-collapse: collapse;
74
  }
75
 
76
  .custom-dataframe thead th {
77
- background-color: #333333;
78
- color: #ffffff;
79
- border-bottom: 2px solid #4a4a4a;
80
  }
81
 
82
  .custom-dataframe tbody td {
83
- border: 1px solid #3a3a3a;
 
84
  }
85
 
86
- /* Style for global result columns in dark mode */
87
  .custom-dataframe thead th:nth-child(-n+4),
88
  .custom-dataframe tbody td:nth-child(-n+4) {
89
- background-color: rgba(0, 50, 100, 0.3);
90
  }
91
 
92
- /* Style for dimension-specific result columns in dark mode */
93
  .custom-dataframe thead th:nth-child(n+5),
94
  .custom-dataframe tbody td:nth-child(n+5) {
95
- background-color: rgba(0, 75, 0, 0.3);
96
  }
97
 
98
- /* Hover effect for better row distinction in dark mode */
99
- .custom-dataframe tbody tr:hover td {
100
- background-color: rgba(255, 255, 255, 0.1);
101
- }
102
-
103
- /* Alternating row colors for better readability in dark mode */
104
  .custom-dataframe tbody tr:nth-child(even) td:nth-child(-n+4) {
105
- background-color: rgba(0, 60, 120, 0.3);
106
  }
107
 
108
  .custom-dataframe tbody tr:nth-child(even) td:nth-child(n+5) {
109
- background-color: rgba(0, 90, 0, 0.3);
 
 
 
 
110
  }
111
  }
 
1
+ :root {
2
+ --background-color: #ffffff;
3
+ --text-color: #000000;
4
+ --header-background: #f0f0f0;
5
+ --global-column-background: #f0f8ff;
6
+ --dimension-column-background: #f0fff0;
7
+ --hover-background: rgba(0, 0, 0, 0.1);
8
+ --border-color: #e0e0e0;
9
+ --row-even-global: #e6f3ff;
10
+ --row-even-dimension: #e6ffe6;
11
  }
12
 
13
+ @media (prefers-color-scheme: dark) {
14
+ :root {
15
+ --background-color: #1a1a1a;
16
+ --text-color: #e0e0e0;
17
+ --header-background: #333333;
18
+ --global-column-background: rgba(0, 50, 100, 0.3);
19
+ --dimension-column-background: rgba(0, 75, 0, 0.3);
20
+ --hover-background: rgba(255, 255, 255, 0.1);
21
+ --border-color: #3a3a3a;
22
+ --row-even-global: rgba(0, 60, 120, 0.3);
23
+ --row-even-dimension: rgba(0, 90, 0, 0.3);
24
+ }
25
  }
26
 
27
+ /* Light mode styles */
28
+ .custom-dataframe {
29
+ color: #000000;
30
+ background-color: #ffffff;
 
 
 
31
  }
32
 
33
+ .custom-dataframe thead th {
34
+ background-color: #f0f0f0 !important;
35
+ color: #000000 !important;
36
  }
37
 
38
+ .custom-dataframe tbody td {
39
+ background-color: #ffffff !important;
40
+ color: #000000 !important;
 
 
41
  }
42
 
 
43
  .custom-dataframe thead th:nth-child(-n+4),
44
  .custom-dataframe tbody td:nth-child(-n+4) {
45
+ background-color: #f0f8ff !important;
46
  }
47
 
 
48
  .custom-dataframe thead th:nth-child(n+5),
49
  .custom-dataframe tbody td:nth-child(n+5) {
50
+ background-color: #f0fff0 !important;
51
  }
52
 
 
53
  .custom-dataframe tbody tr:nth-child(even) td:nth-child(-n+4) {
54
+ background-color: #e6f3ff !important;
55
  }
56
 
57
  .custom-dataframe tbody tr:nth-child(even) td:nth-child(n+5) {
58
+ background-color: #e6ffe6 !important;
59
  }
60
 
61
+ /* Dark mode styles */
62
  @media (prefers-color-scheme: dark) {
63
  .custom-dataframe {
64
+ color: #e0e0e0 !important;
65
+ background-color: #1a1a1a !important;
 
 
 
 
 
66
  }
67
 
68
  .custom-dataframe thead th {
69
+ background-color: #333333 !important;
70
+ color: #ffffff !important;
 
71
  }
72
 
73
  .custom-dataframe tbody td {
74
+ background-color: #1a1a1a !important;
75
+ color: #e0e0e0 !important;
76
  }
77
 
 
78
  .custom-dataframe thead th:nth-child(-n+4),
79
  .custom-dataframe tbody td:nth-child(-n+4) {
80
+ background-color: rgba(0, 50, 100, 0.3) !important;
81
  }
82
 
 
83
  .custom-dataframe thead th:nth-child(n+5),
84
  .custom-dataframe tbody td:nth-child(n+5) {
85
+ background-color: rgba(0, 75, 0, 0.3) !important;
86
  }
87
 
 
 
 
 
 
 
88
  .custom-dataframe tbody tr:nth-child(even) td:nth-child(-n+4) {
89
+ background-color: rgba(0, 60, 120, 0.3) !important;
90
  }
91
 
92
  .custom-dataframe tbody tr:nth-child(even) td:nth-child(n+5) {
93
+ background-color: rgba(0, 90, 0, 0.3) !important;
94
+ }
95
+
96
+ .custom-dataframe tbody tr:hover td {
97
+ background-color: rgba(255, 255, 255, 0.1) !important;
98
  }
99
  }