Skip to content

Commit ea3639d

Browse files
author
iexitdev
committed
Improve docs light chart themes
1 parent 42ce51e commit ea3639d

2 files changed

Lines changed: 108 additions & 45 deletions

File tree

apps/site/src/styles/starlight.css

Lines changed: 69 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,69 @@ chart-kit-preview {
645645
:root {
646646
--chart-kit-preview-padding-x: 10px;
647647
--chart-kit-preview-padding-y: 10px;
648+
--chart-kit-preview-surface: #10131a;
649+
--chart-kit-playground-frame-surface: #10131a;
650+
--chart-kit-playground-preview-surface: #0f1218;
651+
}
652+
653+
:root[data-theme="light"] {
654+
--chart-kit-preview-surface: #ffffff;
655+
--chart-kit-playground-frame-surface: #ffffff;
656+
--chart-kit-playground-preview-surface: #ffffff;
657+
}
658+
659+
:root[data-theme="light"][data-chart-theme="spectrum"] {
660+
--chart-kit-preview-surface: #f4f7ff;
661+
--chart-kit-playground-frame-surface: #f8fbff;
662+
--chart-kit-playground-preview-surface: #f4f7ff;
663+
}
664+
665+
:root[data-theme="light"][data-chart-theme="aurora"] {
666+
--chart-kit-preview-surface: #f7f2ff;
667+
--chart-kit-playground-frame-surface: #fbf7ff;
668+
--chart-kit-playground-preview-surface: #f7f2ff;
669+
}
670+
671+
:root[data-theme="light"][data-chart-theme="verdant"] {
672+
--chart-kit-preview-surface: #f1fbf5;
673+
--chart-kit-playground-frame-surface: #f8fdf9;
674+
--chart-kit-playground-preview-surface: #f1fbf5;
675+
}
676+
677+
:root[data-theme="light"][data-chart-theme="cupertino"] {
678+
--chart-kit-preview-surface: #f2f7ff;
679+
--chart-kit-playground-frame-surface: #f8fbff;
680+
--chart-kit-playground-preview-surface: #f2f7ff;
681+
}
682+
683+
:root[data-theme="light"][data-chart-theme="material"] {
684+
--chart-kit-preview-surface: #fff7fb;
685+
--chart-kit-playground-frame-surface: #fffafd;
686+
--chart-kit-playground-preview-surface: #fff7fb;
687+
}
688+
689+
:root[data-theme="light"][data-chart-theme="graphite"] {
690+
--chart-kit-preview-surface: #f4f5f7;
691+
--chart-kit-playground-frame-surface: #fafbfc;
692+
--chart-kit-playground-preview-surface: #f4f5f7;
693+
}
694+
695+
:root[data-theme="light"][data-chart-theme="contrast"] {
696+
--chart-kit-preview-surface: #ffffff;
697+
--chart-kit-playground-frame-surface: #ffffff;
698+
--chart-kit-playground-preview-surface: #ffffff;
699+
}
700+
701+
:root[data-theme="light"][data-chart-theme="midnight"] {
702+
--chart-kit-preview-surface: #edf3fb;
703+
--chart-kit-playground-frame-surface: #f6f9fd;
704+
--chart-kit-playground-preview-surface: #edf3fb;
705+
}
706+
707+
:root[data-theme="light"][data-chart-theme="studio"] {
708+
--chart-kit-preview-surface: #fff8ea;
709+
--chart-kit-playground-frame-surface: #fffdf8;
710+
--chart-kit-playground-preview-surface: #fff8ea;
648711
}
649712

650713
chart-kit-preview .chart-kit-preview-fallback,
@@ -653,7 +716,7 @@ chart-kit-preview .chart-kit-preview-fallback,
653716
overflow: hidden;
654717
border: 1px solid var(--sl-color-hairline);
655718
border-radius: 0.9rem;
656-
background: #10131a;
719+
background: var(--chart-kit-preview-surface);
657720
padding: var(--chart-kit-preview-padding-y) var(--chart-kit-preview-padding-x);
658721
-webkit-touch-callout: none;
659722
-webkit-user-select: none;
@@ -662,7 +725,7 @@ chart-kit-preview .chart-kit-preview-fallback,
662725

663726
:root[data-theme="light"] chart-kit-preview .chart-kit-preview-fallback,
664727
:root[data-theme="light"] .chart-kit-live-preview__frame {
665-
background: #ffffff;
728+
background: var(--chart-kit-preview-surface);
666729
}
667730

668731
.chart-kit-live-preview__pro-link {
@@ -777,7 +840,7 @@ chart-kit-playground .chart-kit-preview-fallback pre {
777840
overflow: hidden;
778841
border: 1px solid var(--sl-color-hairline);
779842
border-radius: 0.9rem;
780-
background: #10131a;
843+
background: var(--chart-kit-playground-frame-surface);
781844
}
782845

783846
.chart-kit-playground__frame[data-resizing="true"] {
@@ -790,7 +853,7 @@ chart-kit-playground .chart-kit-preview-fallback pre {
790853
}
791854

792855
:root[data-theme="light"] .chart-kit-playground__frame {
793-
background: #ffffff;
856+
background: var(--chart-kit-playground-frame-surface);
794857
}
795858

796859
.chart-kit-playground__grid {
@@ -819,14 +882,14 @@ chart-kit-playground .chart-kit-preview-fallback pre {
819882

820883
.chart-kit-playground__preview-pane {
821884
min-height: 28rem;
822-
background: #0f1218;
885+
background: var(--chart-kit-playground-preview-surface);
823886
-webkit-touch-callout: none;
824887
-webkit-user-select: none;
825888
user-select: none;
826889
}
827890

828891
:root[data-theme="light"] .chart-kit-playground__preview-pane {
829-
background: #ffffff;
892+
background: var(--chart-kit-playground-preview-surface);
830893
}
831894

832895
.chart-kit-playground__resize-handle {

packages/react-native/src/theme/presets.ts

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,13 @@ export const builtInCartesianChartPresets: Record<
171171
},
172172
spectrum: {
173173
light: {
174-
background: "#ffffff",
174+
background: "#f4f7ff",
175175
plotBackground: "#ffffff",
176-
grid: "#dbe5f1",
177-
axis: "#cfdae8",
178-
text: "#102033",
179-
mutedText: "#55708d",
180-
series: ["#2563eb", "#10b981", "#f59e0b", "#7c3aed"],
176+
grid: "#cfddff",
177+
axis: "#b8c8ef",
178+
text: "#122044",
179+
mutedText: "#566482",
180+
series: ["#e11d48", "#2563eb", "#f59e0b", "#16a34a"],
181181
typography: defaultCartesianChartTypography
182182
},
183183
dark: {
@@ -193,13 +193,13 @@ export const builtInCartesianChartPresets: Record<
193193
},
194194
aurora: {
195195
light: {
196-
background: "#f8fbff",
197-
plotBackground: "#ffffff",
198-
grid: "#d9e5f2",
199-
axis: "#c6d6e6",
200-
text: "#08111f",
201-
mutedText: "#52667d",
202-
series: ["#0284c7", "#8b5cf6", "#14b8a6", "#f97316"],
196+
background: "#f7f2ff",
197+
plotBackground: "#fffaff",
198+
grid: "#ddd0ff",
199+
axis: "#c7b7f5",
200+
text: "#21133d",
201+
mutedText: "#705d8f",
202+
series: ["#7c3aed", "#0891b2", "#db2777", "#ea580c"],
203203
typography: defaultCartesianChartTypography
204204
},
205205
dark: {
@@ -215,13 +215,13 @@ export const builtInCartesianChartPresets: Record<
215215
},
216216
verdant: {
217217
light: {
218-
background: "#fbfefc",
219-
plotBackground: "#ffffff",
220-
grid: "#dbeee5",
221-
axis: "#c9dfd4",
222-
text: "#10221a",
223-
mutedText: "#5f776b",
224-
series: ["#059669", "#e11d48", "#0ea5e9", "#84cc16"],
218+
background: "#f1fbf5",
219+
plotBackground: "#fbfffd",
220+
grid: "#cdebd9",
221+
axis: "#b4dbc4",
222+
text: "#0d2618",
223+
mutedText: "#557064",
224+
series: ["#059669", "#65a30d", "#0e7490", "#dc2626"],
225225
typography: defaultCartesianChartTypography
226226
},
227227
dark: {
@@ -237,13 +237,13 @@ export const builtInCartesianChartPresets: Record<
237237
},
238238
cupertino: {
239239
light: {
240-
background: "#f9f9fb",
240+
background: "#f2f7ff",
241241
plotBackground: "#ffffff",
242-
grid: "#e5e5ea",
243-
axis: "#d1d1d6",
244-
text: "#1c1c1e",
245-
mutedText: "#6e6e73",
246-
series: ["#007aff", "#34c759", "#ff9500", "#ff2d55"],
242+
grid: "#d5e6fa",
243+
axis: "#c5d8ed",
244+
text: "#162033",
245+
mutedText: "#617189",
246+
series: ["#007aff", "#ff2d55", "#34c759", "#ff9500"],
247247
typography: defaultCartesianChartTypography
248248
},
249249
dark: {
@@ -259,10 +259,10 @@ export const builtInCartesianChartPresets: Record<
259259
},
260260
material: {
261261
light: {
262-
background: "#fffbfe",
263-
plotBackground: "#ffffff",
264-
grid: "#e7e0ec",
265-
axis: "#cac4d0",
262+
background: "#fff7fb",
263+
plotBackground: "#fffafd",
264+
grid: "#eaddec",
265+
axis: "#d7c5dd",
266266
text: "#1d1b20",
267267
mutedText: "#625b71",
268268
series: ["#6750a4", "#006a6a", "#b3261e", "#7d5260"],
@@ -281,13 +281,13 @@ export const builtInCartesianChartPresets: Record<
281281
},
282282
graphite: {
283283
light: {
284-
background: "#ffffff",
285-
plotBackground: "#ffffff",
286-
grid: "#eceff3",
287-
axis: "#e2e6ec",
284+
background: "#f4f5f7",
285+
plotBackground: "#fbfcfd",
286+
grid: "#d9dee7",
287+
axis: "#c9d0dc",
288288
text: "#111827",
289289
mutedText: "#6b7280",
290-
series: ["#111827", "#64748b", "#94a3b8", "#cbd5e1"],
290+
series: ["#111827", "#475569", "#737b88", "#a1aab6"],
291291
typography: defaultCartesianChartTypography
292292
},
293293
dark: {
@@ -331,10 +331,10 @@ export const builtInCartesianChartPresets: Record<
331331
},
332332
midnight: {
333333
light: {
334-
background: "#f6f8fb",
335-
plotBackground: "#ffffff",
336-
grid: "#d8e0eb",
337-
axis: "#c7d2df",
334+
background: "#edf3fb",
335+
plotBackground: "#f8fbff",
336+
grid: "#bfd0e2",
337+
axis: "#a8b9cc",
338338
text: "#0b1220",
339339
mutedText: "#53657a",
340340
series: ["#0f766e", "#2563eb", "#9333ea", "#ea580c"],

0 commit comments

Comments
 (0)