Skip to content

Commit 9ecfc54

Browse files
authored
Refactor commit graph styling to use css variables (#17860)
- Use common variables for colors and font - Alter graph color 5 to provide enough contrast on both themes
1 parent eb8513a commit 9ecfc54

File tree

2 files changed

+15
-53
lines changed

2 files changed

+15
-53
lines changed

web_src/less/features/gitgraph.less

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@
6868
align-items: center;
6969

7070
.node-relation {
71-
font-family: "Bitstream Vera Sans Mono", Courier, monospace;
71+
font-family: var(--fonts-monospace);
7272
}
7373

7474
.author {
75-
color: #666666;
75+
color: var(--color-text-light);
7676
}
7777

7878
.time {
79-
color: #999999;
79+
color: var(--color-text-light-3);
8080
font-size: 80%;
8181
}
8282

@@ -85,8 +85,8 @@
8585
}
8686

8787
a em {
88-
color: #bb0000;
89-
border-bottom: 1px dotted #bbbbbb;
88+
color: var(--color-red);
89+
border-bottom: 1px dotted var(--color-secondary);
9090
text-decoration: none;
9191
font-style: normal;
9292
}
@@ -108,7 +108,7 @@
108108
width: 100%;
109109

110110
li.highlight.hover {
111-
background-color: rgba(0, 0, 0, .05);
111+
background-color: var(--color-secondary-alpha-30);
112112
}
113113

114114
.tags a.button {
@@ -146,13 +146,13 @@
146146

147147
&.monochrome #rel-container {
148148
.flow-group {
149-
stroke: grey;
150-
fill: grey;
149+
stroke: var(--color-secondary-dark-5);
150+
fill: var(--color-secondary-dark-5);
151151
}
152152

153153
.flow-group.highlight {
154-
stroke: black;
155-
fill: black;
154+
stroke: var(--color-secondary-dark-12);
155+
fill: var(--color-secondary-dark-12);
156156
}
157157
}
158158

@@ -164,7 +164,7 @@
164164
}
165165

166166
&.flow-color-16-2 {
167-
stroke: hsl(356, 58%, 54%);
167+
stroke: #ce4751;
168168
fill: #ce4751;
169169
}
170170

@@ -179,8 +179,8 @@
179179
}
180180

181181
&.flow-color-16-5 {
182-
stroke: #3d27aa;
183-
fill: #3d27aa;
182+
stroke: #7445e9;
183+
fill: #7445e9;
184184
}
185185

186186
&.flow-color-16-6 {
@@ -261,8 +261,8 @@
261261
}
262262

263263
&.flow-color-16-5 {
264-
stroke: #4e33d1;
265-
fill: #4f35d1;
264+
stroke: #8455f9;
265+
fill: #8455f9;
266266
}
267267

268268
&.flow-color-16-6 {

web_src/less/themes/theme-arc-green.less

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -676,44 +676,6 @@ img[src$="/img/matrix.svg"] {
676676
filter: invert(80%);
677677
}
678678

679-
#git-graph-container li .time {
680-
color: #6a737d;
681-
}
682-
683-
#git-graph-container.monochrome #rel-container .flow-group {
684-
stroke: dimgrey;
685-
fill: dimgrey;
686-
}
687-
688-
#git-graph-container.monochrome #rel-container .flow-group.highlight {
689-
stroke: darkgrey;
690-
fill: darkgrey;
691-
}
692-
693-
#git-graph-container:not(.monochrome) #rel-container .flow-group {
694-
&.flow-color-16-5 {
695-
stroke: #5543b1;
696-
fill: #5543b1;
697-
}
698-
}
699-
700-
#git-graph-container:not(.monochrome) #rel-container .flow-group.highlight {
701-
&.flow-color-16-5 {
702-
stroke: #7058e6;
703-
fill: #7058e6;
704-
}
705-
}
706-
707-
#git-graph-container #rev-list li.highlight.hover {
708-
background-color: rgba(255, 255, 255, .1);
709-
}
710-
711-
#git-graph-container .ui.buttons button#flow-color-monochrome.ui.button {
712-
border-left-color: rgb(76, 80, 92);
713-
border-left-style: solid;
714-
border-left-width: 1px;
715-
}
716-
717679
.mermaid-chart {
718680
filter: invert(84%) hue-rotate(180deg);
719681
}

0 commit comments

Comments
 (0)