Skip to content

Commit 43a7a07

Browse files
committed
Move GitHub labels to the global scope and increase style range
1 parent 345ff44 commit 43a7a07

File tree

2 files changed

+46
-33
lines changed

2 files changed

+46
-33
lines changed

content/contributing-code/repo-labels/contents.lr

+11-11
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,19 @@ The priority of an issue is based on its impact, derived from a combination of
6363
urgency and importance. This determines the importance of the issue when sprint
6464
planning or deciding which issues to tackle next.
6565

66-
- <span class="gh-label has-text-white" style="background-color: #b60205;">
66+
- <span class="gh-label priority-unfavourable">
6767
🟥 priority: critical
6868
</span>
6969
- **Description:** Must be fixed ASAP
70-
- <span class="gh-label has-text-black" style="background-color: #ff9f1c;">
70+
- <span class="gh-label priority-negative">
7171
🟧 priority: high
7272
</span>
7373
- **Description:** Stalls work on the project or its dependents
74-
- <span class="gh-label has-text-black" style="background-color: #ffcc00;">
74+
- <span class="gh-label priority-neutral">
7575
🟨 priority: medium
7676
</span>
7777
- **Description:** Not blocking but should be fixed soon
78-
- <span class="gh-label has-text-black" style="background-color: #cfda2c;">
78+
- <span class="gh-label priority-positive">
7979
🟩 priority: low
8080
</span>
8181
- **Description:** Low priority and doesn't need to be rushed
@@ -113,32 +113,32 @@ may not be ready to be worked on for a number of reasons and the maintainers
113113
must keep updating the labels as the situation evolves.
114114

115115
An issue, at the time of closing can have either the
116-
<span class="gh-label has-text-black" style="background-color: #cccccc;">
116+
<span class="gh-label status-light">
117117
🏁 status: ready for dev
118118
</span>
119119
or the
120-
<span class="gh-label has-text-black" style="background-color: #eeeeee;">
120+
<span class="gh-label status-lighter">
121121
⛔️ status: discarded
122122
</span>
123123
label based on whether it was closed with or without resolution, respectively.
124124

125-
- <span class="gh-label has-text-black" style="background-color: #cccccc;">
125+
- <span class="gh-label status-light">
126126
🏁 status: ready for dev
127127
</span>
128128
- **Description:** Ready for work
129-
- <span class="gh-label has-text-black" style="background-color: #999999;">
129+
- <span class="gh-label status-neutral">
130130
🚧 status: blocked
131131
</span>
132132
- **Description:** Blocked & therefore, not ready for work
133-
- <span class="gh-label has-text-white" style="background-color: #666666;">
133+
- <span class="gh-label status-dark">
134134
🧹 status: ticket work required
135135
</span>
136136
- **Description:** Needs more details before it can be worked on
137-
- <span class="gh-label has-text-black" style="background-color: #eeeeee;">
137+
- <span class="gh-label status-lighter">
138138
⛔️ status: discarded
139139
</span>
140140
- **Description:** Will not be worked on
141-
- <span class="gh-label has-text-white" style="background-color: #333333;">
141+
- <span class="gh-label status-darker">
142142
🚦 status: awaiting triage
143143
</span>
144144
- **Description:** Has not been triaged & therefore, not ready for work

webpack/sass/main.scss

+35-22
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,41 @@ pre {
3131
}
3232
}
3333

34+
// GitHub labels
35+
.gh-label {
36+
display: inline-block;
37+
font-size: smaller;
38+
padding: 0 1em;
39+
border: 1px solid #eeeeee;
40+
border-radius: 999em;
41+
margin-right: 0.25em;
42+
43+
$label-colors: (
44+
('goal' #ffffff #000000),
45+
('aspect' #04338c #ffffff),
46+
('skill' #5ff1f5 #000000),
47+
('talk' #f9bbe5 #000000),
48+
('friendliness' #7f0799 #ffffff),
49+
('status-lighter' #eeeeee #000000),
50+
('status-light' #cccccc #000000),
51+
('status-neutral' #999999 #000000),
52+
('status-dark' #666666 #ffffff),
53+
('status-darker' #333333 #ffffff),
54+
('priority-unfavourable' #b60205 #ffffff),
55+
('priority-negative' #ff9f1c #000000),
56+
('priority-neutral' #ffcc00 #000000),
57+
('priority-positive' #cfda2c #000000),
58+
('priority-favourable' #008672 #ffffff),
59+
('miscellaneous' #000000 #ffffff),
60+
);
61+
@each $category, $background-color, $foreground-color in $label-colors {
62+
&.#{$category} {
63+
background-color: $background-color;
64+
color: $foreground-color;
65+
}
66+
}
67+
}
68+
3469
.content {
3570
@extend .body-big;
3671

@@ -523,28 +558,6 @@ pre {
523558
@extend .padding-bottom-xxl;
524559
@extend .padding-top-xl;
525560
}
526-
527-
.gh-label {
528-
display: inline-block;
529-
font-size: $font-size-body-normal;
530-
padding: 0 1em;
531-
border: 1px solid #eeeeee;
532-
border-radius: 999em;
533-
534-
$label-colors: (
535-
('goal' #ffffff #000000),
536-
('aspect' #04338c #ffffff),
537-
('skill' #5ff1f5 #000000),
538-
('talk' #f9bbe5 #000000),
539-
('friendliness' #7f0799 #ffffff)
540-
);
541-
@each $category, $background-color, $foreground-color in $label-colors {
542-
&.#{$category} {
543-
background-color: $background-color;
544-
color: $foreground-color;
545-
}
546-
}
547-
}
548561
}
549562
}
550563

0 commit comments

Comments
 (0)