Skip to content

Commit d9d44c4

Browse files
committed
Refactor light theme to use base theme
1 parent 3ec4b58 commit d9d44c4

File tree

5 files changed

+118
-515
lines changed

5 files changed

+118
-515
lines changed

src/themes/_base.scss

Lines changed: 44 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
@use '../styles/mixins' as *;
2+
@use './palette' as palette;
23

34
// Theme options
45
$dark: true !default;
56

67
// Color palette
7-
$common-white: #fff !default;
8-
$background-default: #101010 !default;
9-
$background-paper: #202020 !default;
10-
$primary-main: #00a4dc !default;
11-
$primary-dark: #00729a !default;
12-
$primary-light: #33b6e3 !default;
13-
$primary-hover: rgba(0, 164, 220, 0.2) !default;
14-
$primary-contrastText: rgba(0, 0, 0, 0.87) !default;
15-
$error-main: #c62828 !default;
16-
$error-dark: #8a1c1c !default;
17-
$error-light: #d15353 !default;
18-
$error-contrastText: #fff !default;
19-
$text-primary: #fff !default;
20-
$text-secondary: rgba(255, 255, 255, 0.7) !default;
21-
$action-focus: rgba(255, 255, 255, 0.12) !default;
22-
$action-hover: rgba(255, 255, 255, 0.08) !default;
23-
$divider: rgba(255, 255, 255, 0.12) !default;
8+
$common-white: palette.$common-white !default;
9+
$background-default: palette.$background-default !default;
10+
$background-paper: palette.$background-paper !default;
11+
$primary-main: palette.$primary-main !default;
12+
$primary-dark: palette.$primary-dark !default;
13+
$primary-light: palette.$primary-light !default;
14+
$primary-hover: palette.$primary-hover !default;
15+
$primary-contrastText: palette.$primary-contrastText !default;
16+
$error-main: palette.$error-main !default;
17+
$error-dark: palette.$error-dark !default;
18+
$error-light: palette.$error-light !default;
19+
$error-contrastText: palette.$error-contrastText !default;
20+
$text-primary: palette.$text-primary !default;
21+
$text-secondary: palette.$text-secondary !default;
22+
$action-focus: palette.$action-focus !default;
23+
$action-hover: palette.$action-hover !default;
24+
$divider: palette.$divider !default;
2425

2526
// Components
2627
$appBar-defaultBg: #202020 !default;
@@ -34,6 +35,11 @@ $button-inheritContainedHoverBg: #616161 !default;
3435
$snackbarContent-bg: #303030 !default;
3536
$snackbarContent-color: rgba(255, 255, 255, 0.87) !default;
3637

38+
// Assign custom css variables not part of the MUI theme palette
39+
:root {
40+
--jf-palette-AppBar-transparentBg: #{$appBar-transparentBg};
41+
}
42+
3743
* {
3844
scrollbar-width: thin;
3945
scrollbar-color: #3b3b3b #202020;
@@ -253,7 +259,7 @@ html {
253259
}
254260

255261
.mediaInfoText {
256-
@include var(border-color, --jf-palette-text-secondary, $text-secondary);
262+
border-color: inherit;
257263
border-style: solid;
258264
border-width: 1px;
259265
}
@@ -361,6 +367,26 @@ html {
361367
border-color: rgba(255, 255, 255, 0.05);
362368
}
363369

370+
.programCell-sports {
371+
background: #3949ab !important;
372+
}
373+
374+
.programCell-movie {
375+
background: #5e35b1 !important;
376+
}
377+
378+
.programCell-kids {
379+
background: #039be5 !important;
380+
}
381+
382+
.programCell-news {
383+
background: #43a047 !important;
384+
}
385+
386+
.programCell-active {
387+
background: #1e1e1e !important;
388+
}
389+
364390
.guide-channelHeaderCell:focus,
365391
.programCell:focus {
366392
@include var(background-color, --jf-palette-primary-main, $primary-main, true);

src/themes/_palette.scss

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
$common-white: #fff;
2+
$background-default: #101010;
3+
$background-paper: #202020;
4+
$primary-main: #00a4dc;
5+
$primary-dark: #00729a;
6+
$primary-light: #33b6e3;
7+
$primary-hover: rgba(0, 164, 220, 0.2);
8+
$primary-contrastText: rgba(0, 0, 0, 0.87);
9+
$error-main: #c62828;
10+
$error-dark: #8a1c1c;
11+
$error-light: #d15353;
12+
$error-contrastText: #fff;
13+
$text-primary: #fff;
14+
$text-secondary: rgba(255, 255, 255, 0.7);
15+
$action-focus: rgba(255, 255, 255, 0.12);
16+
$action-hover: rgba(255, 255, 255, 0.08);
17+
$divider: rgba(255, 255, 255, 0.12);

src/themes/dark/theme.scss

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -31,30 +31,3 @@
3131
background: none;
3232
}
3333
}
34-
35-
/* Live TV guide */
36-
.channelPrograms,
37-
.guide-channelHeaderCell,
38-
.programCell {
39-
border-color: rgba(255, 255, 255, 0.05);
40-
}
41-
42-
.programCell-sports {
43-
background: #3949ab !important;
44-
}
45-
46-
.programCell-movie {
47-
background: #5e35b1 !important;
48-
}
49-
50-
.programCell-kids {
51-
background: #039be5 !important;
52-
}
53-
54-
.programCell-news {
55-
background: #43a047 !important;
56-
}
57-
58-
.programCell-active {
59-
background: #1e1e1e !important;
60-
}

0 commit comments

Comments
 (0)