Skip to content

Commit 677a09e

Browse files
Consolidate more CSS rules, fix inline code on arc-green (#21260)
- Consolidate various CSS rules into base rules - Fix inline code in Markdown not having enough contrast on arc-green Adds one new color variable, `--color-label-active-bg` for the background of active labels. Co-authored-by: wxiaoguang <[email protected]>
1 parent 5a3b9ac commit 677a09e

File tree

2 files changed

+38
-47
lines changed

2 files changed

+38
-47
lines changed

web_src/less/_base.less

+36-1
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@
158158
--color-tooltip-bg: #000000f0;
159159
--color-tooltip-text: #ffffff;
160160
--color-header-bar: #ffffff;
161+
--color-label-active-bg: #d0d0d0;
161162
/* backgrounds */
162163
--checkbox-mask-checked: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="-1 -1 18 18" width="16" height="16"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg>');
163164
--checkbox-mask-indeterminate: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M2 7.75A.75.75 0 012.75 7h10a.75.75 0 010 1.5h-10A.75.75 0 012 7.75z"></path></svg>');
@@ -393,6 +394,12 @@ a.commit-statuses-trigger {
393394
background: var(--color-grey);
394395
}
395396

397+
.ui.active.label {
398+
background: var(--color-label-active-bg);
399+
border-color: var(--color-label-active-bg);
400+
color: var(--color-text-dark);
401+
}
402+
396403
.ui.link.menu .item:hover,
397404
.ui.menu .dropdown.item:hover,
398405
.ui.menu .link.item:hover,
@@ -478,11 +485,21 @@ a.commit-statuses-trigger {
478485
color: var(--color-text-light-2);
479486
}
480487

488+
.ui.list .list > .item .header,
489+
.ui.list > .item .header {
490+
color: var(--color-text-dark);
491+
}
492+
481493
.ui.list .list > .item > .content,
482494
.ui.list > .item > .content {
483495
color: var(--color-text);
484496
}
485497

498+
.ui.list .list > .item .description,
499+
.ui.list > .item .description {
500+
color: var(--color-text);
501+
}
502+
486503
.ui.secondary.menu .dropdown.item:hover,
487504
.ui.secondary.menu .link.item:hover,
488505
.ui.secondary.menu a.item:hover {
@@ -704,6 +721,12 @@ a.ui.card:hover,
704721
border-top-color: var(--color-secondary-alpha-50);
705722
}
706723

724+
.ui.ui.ui.ui.table tr.active,
725+
.ui.ui.table td.active {
726+
color: var(--color-text);
727+
background: var(--color-active);
728+
}
729+
707730
.ui.ui.selectable.table > tbody > tr:hover,
708731
.ui.table tbody tr td.selectable:hover {
709732
color: var(--color-text);
@@ -726,11 +749,22 @@ a.ui.card:hover,
726749
}
727750

728751
.ui.modal > .header {
752+
color: var(--color-text-dark);
753+
background: var(--color-secondary-bg);
729754
border-color: var(--color-secondary);
730755
border-top-left-radius: var(--border-radius);
731756
border-top-right-radius: var(--border-radius);
732757
}
733758

759+
.ui.modal > .content {
760+
background: var(--color-body);
761+
}
762+
763+
.ui.modal > .actions {
764+
background: var(--color-secondary-bg);
765+
border-color: var(--color-secondary);
766+
}
767+
734768
.ui.modal > .close.inside,
735769
.ui.fullscreen.modal > .close {
736770
top: 11px; /* align modal close icon, for example admin notices */
@@ -1591,6 +1625,7 @@ i.icon.centerlock {
15911625
.ui.labels a.label:hover,
15921626
a.ui.label:hover {
15931627
background: var(--color-hover);
1628+
border-color: var(--color-hover);
15941629
color: var(--color-text);
15951630
}
15961631

@@ -1615,7 +1650,7 @@ a.ui.label:hover {
16151650
padding-left: 10px;
16161651
padding-right: 10px;
16171652
text-align: right !important;
1618-
color: rgba(27, 31, 35, .3);
1653+
color: var(--color-text-light-1);
16191654
width: 1%;
16201655
font-family: var(--fonts-monospace);
16211656

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

+2-46
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
--color-menu: #2e323e;
119119
--color-card: #2e323e;
120120
--color-markup-table-row: #ffffff06;
121-
--color-markup-code-block: #292d39;
121+
--color-markup-code-block: #ffffff0d;
122122
--color-button: #353846;
123123
--color-code-bg: #2a2e3a;
124124
--color-code-sidebar-bg: #2e323e;
@@ -133,6 +133,7 @@
133133
--color-reaction-bg: #ffffff12;
134134
--color-reaction-active-bg: var(--color-primary-alpha-40);
135135
--color-header-bar: #2e323e;
136+
--color-label-active-bg: #4c525e;
136137
}
137138

138139
::-webkit-calendar-picker-indicator {
@@ -228,11 +229,6 @@ a.ui.basic.green.label:hover {
228229
background-color: #a0cc75;
229230
}
230231

231-
.repository .navbar .active.item,
232-
.repository .navbar .active.item:hover {
233-
border-color: transparent !important;
234-
}
235-
236232
.repository .diff-stats li {
237233
border-color: var(--color-secondary);
238234
}
@@ -247,37 +243,11 @@ a.ui.basic.green.label:hover {
247243
background-color: #984646;
248244
}
249245

250-
.ui.list .list > .item .header,
251-
.ui.list > .item .header {
252-
color: #dedede;
253-
}
254-
255-
.ui.list .list > .item .description,
256-
.ui.list > .item .description {
257-
color: var(--color-secondary-dark-6);
258-
}
259-
260-
.lines-num {
261-
color: var(--color-secondary-dark-6) !important;
262-
border-color: var(--color-secondary) !important;
263-
}
264-
265246
.lines-code.active,
266247
.lines-code .active {
267248
background: #534d1b !important;
268249
}
269250

270-
.ui.ui.ui.ui.table tr.active,
271-
.ui.ui.table td.active {
272-
color: #dbdbdb;
273-
}
274-
275-
.ui.active.label {
276-
background: #393d4a;
277-
border-color: #393d4a;
278-
color: #dbdbdb;
279-
}
280-
281251
.ui.header .sub.header {
282252
color: var(--color-secondary-dark-6);
283253
}
@@ -286,20 +256,6 @@ a.ui.basic.green.label:hover {
286256
border-bottom: 1px solid var(--color-secondary);
287257
}
288258

289-
.ui.modal > .header {
290-
background: var(--color-secondary);
291-
color: #dbdbdb;
292-
}
293-
294-
.ui.modal > .actions {
295-
background: var(--color-secondary);
296-
border-color: var(--color-secondary);
297-
}
298-
299-
.ui.modal > .content {
300-
background: #383c4a;
301-
}
302-
303259
.minicolors-panel {
304260
background: var(--color-secondary) !important;
305261
border-color: #6a737d !important;

0 commit comments

Comments
 (0)