Skip to content

Commit ca53c99

Browse files
authored
HUD commit details: fix css colors in dark mode (#6451)
In both commit details and minihud: move css background colors to vars and add dark versions before: ![image](https://github.com/user-attachments/assets/c269047f-5b76-48c8-9c6d-76e627685e82) ![image](https://github.com/user-attachments/assets/cd6036e9-b79b-4bcc-a9ac-96df571d1fc1) after: <img width="1092" alt="image" src="https://github.com/user-attachments/assets/0639d88b-ebe2-4c5a-ba5d-1942ea1e499b" /> ![image](https://github.com/user-attachments/assets/5aa5ccda-fb3c-4e60-b8bb-c6739a38b53b)
1 parent 6bbb1cc commit ca53c99

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

torchci/components/commit.module.css

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.commitMessage {
2-
background-color: whitesmoke;
2+
background-color: var(--commit-message-bg);
33
white-space: pre;
44
max-height: 13em;
55
overflow: scroll;
@@ -16,20 +16,20 @@
1616
border: 1px solid gray;
1717
padding: 10px;
1818
border-radius: 5px;
19-
background-color: mistyrose;
19+
background-color: var(--workflow-box-fail-bg);
2020
}
2121

2222
.workflowBoxSuccess {
2323
border: 1px solid gray;
2424
padding: 10px;
2525
border-radius: 5px;
26-
background-color: azure;
26+
background-color: var(--workflow-box-success-bg);
2727
}
2828

2929
.buttonBorder {
3030
border: 1px solid;
3131
}
3232

3333
.buttonBorder:hover {
34-
background-color: lightgrey;
34+
background-color: var(--button-hover-bg);
3535
}

torchci/components/minihud.module.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@
123123

124124
/* Add even/odd row styling for better readability in tables */
125125
.tableWrapper :global(tbody tr:nth-child(odd)) {
126-
background-color: #f5f5f5;
126+
background-color: var(--table-row-odd-bg);
127127
}
128128

129129
.tableWrapper :global(tbody tr:nth-child(even)) {
130-
background-color: rgba(125, 125, 125, 0.1);
130+
background-color: var(--table-row-even-bg);
131131
}

torchci/components/utilization/components/TestSectionView/ToggleTestsGroup.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const TestList = styled(Paper)({
3333
maxHeight: 300,
3434
maxWidth: 800,
3535
overflow: "auto",
36-
backgroundColor: "#f5f5f5",
36+
backgroundColor: "var(--table-row-odd-bg)",
3737
});
3838
const defaultTestViewValue = "chart";
3939

torchci/styles/globals.css

+9-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
--forced-merge-failure-bg: #ffe0b3;
1818
--selected-row-bg: lightblue;
1919
--highlight-bg: #ffa;
20+
--commit-message-bg: whitesmoke;
21+
--button-hover-bg: lightgrey;
22+
--table-row-odd-bg: #f5f5f5;
23+
--table-row-even-bg: rgba(125, 125, 125, 0.1);
2024

2125
/* MiniHud specific colors */
2226
--workflow-box-none-bg: lightgray;
@@ -78,12 +82,16 @@
7882
--forced-merge-failure-bg: #a06200;
7983
--selected-row-bg: #164863;
8084
--highlight-bg: #555500;
85+
--commit-message-bg: #2a2a2a;
86+
--button-hover-bg: #4a4a4a;
87+
--table-row-odd-bg: #2a2a2a;
88+
--table-row-even-bg: rgba(125, 125, 125, 0.1);
8189

8290
/* MiniHud specific colors - dark mode variants */
8391
--workflow-box-none-bg: #383838;
8492
--workflow-box-fail-bg: #4b2c2c;
8593
--workflow-box-pending-bg: #1e3540;
86-
--workflow-box-success-bg: #1e4020;
94+
--workflow-box-success-bg: #0d3010;
8795
--workflow-box-classified-bg: #3b332a;
8896
--workflow-box-highlight-border: #1e7e82;
8997
--workflow-box-highlight-shadow: rgba(26, 98, 117, 0.7);

0 commit comments

Comments
 (0)