Skip to content
This repository was archived by the owner on Nov 12, 2025. It is now read-only.

Commit eccfdc3

Browse files
committed
Add theming
Bug: 193062584 Bug: 193436805 Change-Id: Iefdbc010b1c14272fb40ca5f3715bd3a5a8cf77d
1 parent ee1e57d commit eccfdc3

File tree

4 files changed

+2368
-1
lines changed

4 files changed

+2368
-1
lines changed

angular.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@
4242
"output": "."
4343
}
4444
],
45-
"styles": [],
45+
"styles": [
46+
"src/theme.css",
47+
"src/styles.css"
48+
],
4649
"scripts": []
4750
},
4851
"configurations": {

src/app/tab-preferences/tab-preferences.component.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
* limitations under the License.
1515
*/
1616

17+
#btn-header mat-icon {
18+
transform: rotate(180deg);
19+
}
20+
1721
mat-slide-toggle {
1822
display: block; /* Force new line */
1923
}

src/styles.css

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/* You can add global styles to this file, and also import other style files */
2+
3+
html, body { height: 100%; }
4+
body {
5+
margin: 0;
6+
font-family: Roboto, "Helvetica Neue", sans-serif;
7+
color: var(--primary-text-color);
8+
}
9+
10+
span.diff-neutral {
11+
color: var(--primary-text-color);
12+
}
13+
14+
span.diff-added {
15+
color: var(--added-text-color);
16+
}
17+
18+
span.diff-removed {
19+
color: var(--removed-text-color);
20+
}
21+
22+
button {
23+
text-transform: uppercase;
24+
margin-right: 8px !important;
25+
}
26+
27+
.mat-tab-body-wrapper {
28+
height: 100vh;
29+
padding-left: 8px;
30+
overflow-y: auto;
31+
}
32+
33+
h1 {
34+
padding-top: 8px;
35+
}
36+
37+
.mat-form-field {
38+
width: calc(100vw - 54px);
39+
}
40+
41+
/**
42+
* Light/Dark theme differences
43+
* Change variables in each mode to affect styles throughout extension.
44+
*/
45+
@media (prefers-color-scheme: light) {
46+
body {
47+
--primary-text-color: #000000;
48+
--added-text-color: #388E3C;
49+
--removed-text-color: #D32F2F;
50+
--primary-background-color: #EEEEEE;
51+
--button-background-color: #263238;
52+
--button-text-color: #999;
53+
--toggle-background-color: rgba(176,190,197,.54);
54+
--toggle-thumb-color: #b0bec5;
55+
--label-unselected-text-color: rgba(0, 0, 0, 0.7);
56+
}
57+
}
58+
59+
@media (prefers-color-scheme: dark) {
60+
body {
61+
--primary-text-color: #EFEFEF;
62+
--added-text-color: #81C784;
63+
--removed-text-color: #E57373;
64+
--primary-background-color: #212121;
65+
--button-background-color: #CFD8DC;
66+
--button-text-color: #212121;
67+
--toggle-background-color: rgba(96,125,139,.54);
68+
--toggle-thumb-color: rgb(96, 125, 139); /* #607D8B */
69+
--label-unselected-text-color: rgba(255, 255, 255, 0.7);
70+
}
71+
}

0 commit comments

Comments
 (0)