Skip to content

Commit 7cf81f0

Browse files
committed
benchmarks website dark mode
Signed-off-by: Mikhail Kot <mikhail@spiraldb.com>
1 parent bf6303d commit 7cf81f0

2 files changed

Lines changed: 22 additions & 4 deletions

File tree

benchmarks-website/src/components/ChartContainer.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ export default function ChartContainer({
453453
display: true,
454454
grid: {
455455
display: true,
456-
color: 'rgba(0, 0, 0, 0.12)',
456+
color: 'rgba(166, 166, 166, 0.12)',
457457
},
458458
ticks: {
459459
maxRotation: 45,
@@ -481,7 +481,7 @@ export default function ChartContainer({
481481
display: true,
482482
beginAtZero: true,
483483
grid: {
484-
color: 'rgba(0, 0, 0, 0.12)',
484+
color: 'rgba(166, 166, 166, 0.12)',
485485
},
486486
ticks: {
487487
font: {

benchmarks-website/src/styles/index.css

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,20 @@
3535
--radius-lg: 12px;
3636
}
3737

38+
@media (prefers-color-scheme: dark) { :root {
39+
--primary-color: var(--vortex-blue);
40+
--primary-hover: #8a9cff;
41+
--accent-color: var(--vortex-green);
42+
--bg-color: #050507;
43+
--bg-secondary: #121219;
44+
--text-color: #F5F5F7;
45+
--text-secondary: #A0A0B0;
46+
--border-color: #30303a;
47+
--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.6);
48+
--shadow-md: 0 4px 8px rgba(0, 0, 0, 0.7);
49+
--shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.8);
50+
}}
51+
3852
/* Reset and base styles */
3953
* {
4054
box-sizing: border-box;
@@ -100,6 +114,7 @@ code, pre {
100114
padding: 0 32px;
101115
width: 100%;
102116
gap: 24px;
117+
background: var(--bg-secondary);
103118
}
104119

105120
.header-left {
@@ -177,6 +192,7 @@ code, pre {
177192
padding: 8px 20px;
178193
border: 1px solid var(--border-color);
179194
background: var(--bg-color);
195+
color: var(--text-color);
180196
border-radius: var(--radius-md);
181197
cursor: pointer;
182198
font-size: 14px;
@@ -206,6 +222,7 @@ code, pre {
206222
font-size: 14px;
207223
font-weight: 500;
208224
background: var(--bg-color);
225+
color: var(--text-color);
209226
transition: border-color 0.2s;
210227
}
211228

@@ -264,7 +281,7 @@ code, pre {
264281
/* Sidebar Navigation */
265282
.sidebar {
266283
width: var(--sidebar-width);
267-
background: rgba(250, 250, 250, 0.98);
284+
background: var(--bg-secondary);
268285
-webkit-backdrop-filter: blur(10px);
269286
backdrop-filter: blur(10px);
270287
border-right: 1px solid var(--border-color);
@@ -508,6 +525,7 @@ code, pre {
508525
padding: 16px 32px;
509526
background: var(--bg-secondary);
510527
border-bottom: 1px solid var(--border-color);
528+
border-radius: var(--radius-lg);
511529
cursor: pointer;
512530
-webkit-user-select: none;
513531
user-select: none;
@@ -516,7 +534,7 @@ code, pre {
516534
}
517535

518536
.benchmark-header:hover {
519-
background: #F5F5F5;
537+
background: var(--bg-color);
520538
}
521539

522540
.title-wrapper {

0 commit comments

Comments
 (0)