Skip to content

Commit 619ee61

Browse files
committed
feat(Dashboard): started implementation of light theme
Related to #445 Signed-off-by: Jean-Baptiste Bianchi <[email protected]>
1 parent 511d103 commit 619ee61

File tree

7 files changed

+68
-26
lines changed

7 files changed

+68
-26
lines changed

src/dashboard/Synapse.Dashboard/compilerconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
[
22
{
33
"outputFile": "wwwroot/css/app.css",
4-
"inputFile": "wwwroot/css/app.scss"
4+
"inputFile": "wwwroot/css/app.scss",
5+
"sourceMap": true
56
},
67
{
78
"outputFile": "Layout/MainLayout.razor.css",

src/dashboard/Synapse.Dashboard/wwwroot/css/app.css

Lines changed: 29 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/dashboard/Synapse.Dashboard/wwwroot/css/app.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/dashboard/Synapse.Dashboard/wwwroot/css/graph.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,15 @@ $viridisScale: // generated with 13 steps, using 12 to exclude the last yellow
5050
}
5151
}
5252

53+
[data-bs-theme="dark"] {
54+
.graph-container, .graph-canvas {
55+
--fill-color: #{$dark-bg-subtle-dark};
56+
}
57+
}
58+
5359
.graph-container, .graph-canvas {
5460
--stroke-color: #{$mute};
55-
--fill-color: #{$dark-bg-subtle-dark};
61+
--fill-color: #{$body-bg};
5662
display: flex;
5763
flex-direction: column;
5864

@@ -68,6 +74,7 @@ $viridisScale: // generated with 13 steps, using 12 to exclude the last yellow
6874
stroke: var(--bs-btn-color);
6975
fill: var(--bs-btn-color);
7076
border: var(--bs-btn-border-width) solid var(--bs-btn-border-color);
77+
7178
&:hover {
7279
color: var(--bs-btn-hover-color);
7380
fill: var(--bs-btn-hover-color);

src/dashboard/Synapse.Dashboard/wwwroot/css/scrollbar.scss

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
@import "./theme/_variables.scss";
22

3+
:root,
4+
[data-bs-theme=light] {
5+
--scrollbar-background: #{$body-bg};
6+
--scrollbar-background-active: inherit;
7+
--scrollbar-thumb-background: inherit;
8+
}
9+
10+
[data-bs-theme="dark"] {
11+
--scrollbar-background: #{$body-bg-dark};
12+
--scrollbar-background-active: #{$dark-bg-subtle-dark};
13+
--scrollbar-thumb-background: #{$primary-bg-subtle-dark};
14+
}
15+
316
::-webkit-scrollbar {
417
width: 4px;
518
height: 4px;
@@ -11,7 +24,7 @@
1124
}
1225

1326
::-webkit-scrollbar-thumb {
14-
background: $primary-bg-subtle-dark;
27+
background: var(--scrollbar-thumb-background);
1528
border: 0px none #ffffff;
1629
border-radius: $border-radius;
1730
}
@@ -25,17 +38,17 @@
2538
}
2639

2740
::-webkit-scrollbar-track {
28-
background: $body-bg-dark;
41+
background: var(--scrollbar-background);
2942
border: 0px none #ffffff;
3043
border-radius: $border-radius;
3144
}
3245

3346
::-webkit-scrollbar-track:hover {
34-
background: $dark-bg-subtle-dark;
47+
background: var(--scrollbar-background-active);
3548
}
3649

3750
::-webkit-scrollbar-track:active {
38-
background: $dark-bg-subtle-dark;
51+
background: var(--scrollbar-background-active);
3952
}
4053

4154
::-webkit-scrollbar-corner {

src/dashboard/Synapse.Dashboard/wwwroot/css/table.scss

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
.table-container {
1+
@import "./theme/_variables.scss";
2+
3+
[data-bs-theme="dark"] {
4+
.table {
5+
--#{$prefix}table-color: #{$body-color-dark};
6+
}
7+
}
8+
9+
.table-container {
210
max-height: 100%;
311
overflow-y: scroll;
412
flex-grow: 1;
@@ -11,7 +19,6 @@
1119
right: 0;
1220
bottom: 0;
1321
left: 0;
14-
background: rgba(var(--bs-gray-900-rgb), 0.3);
1522
display: flex;
1623
align-items: center;
1724
justify-content: center;

src/dashboard/Synapse.Dashboard/wwwroot/css/theme/_variables.scss

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,11 @@ $mute-text-dark: $mute;
5858

5959
@import "../../lib/bootstrap/scss/variables-dark";
6060

61-
$table-color: $body-color-dark;
62-
6361
@import "../../lib/bootstrap/scss/functions";
6462
@import "../../lib/bootstrap/scss/maps";
6563
@import "../../lib/bootstrap/scss/mixins";
6664

67-
$extra-colors: (
68-
"accent": $accent,
69-
"cinereous": $cinereous,
70-
"verdigris": $verdigris,
71-
"icterine": $icterine,
72-
"mute": $mute
73-
);
65+
$extra-colors: ( "accent": $accent, "cinereous": $cinereous, "verdigris": $verdigris, "icterine": $icterine, "mute": $mute );
7466

7567
$colors: map-merge( $colors, $extra-colors );
7668
$theme-colors: map-merge( $theme-colors, $extra-colors );
@@ -88,4 +80,4 @@ $utilities-bg-subtle: map-merge( $utilities-bg-subtle, $extra-colors );
8880
$utilities-border-subtle: map-merge( $utilities-border-subtle, $extra-colors );
8981

9082
$utilities-text-colors: map-loop( $utilities-text, rgba-css-var, "$key", "text" );
91-
$utilities-bg-colors: map-loop( $utilities-colors, rgba-css-var, "$key", "bg" );
83+
$utilities-bg-colors: map-loop( $utilities-colors, rgba-css-var, "$key", "bg" );

0 commit comments

Comments
 (0)