-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patharticle-types.css
More file actions
350 lines (313 loc) · 13.5 KB
/
article-types.css
File metadata and controls
350 lines (313 loc) · 13.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
/**
* Article Type Theme System
*
* Defines CSS custom property overrides for each article type within the
* cyberpunk design system. Every `<article class="news-article article-type-*">`
* element inherits these variables, which are consumed by component styles
* (SWOT, dashboard, mindmap, section borders, etc.).
*
* Design guide:
* | Article Type | Accent | Layout emphasis |
* |-------------------|-----------------|-------------------------------|
* | week-ahead | Cyan | Calendar grid + analysis |
* | committee-reports | Green | Report cards + voting |
* | propositions | Orange | Impact assessment |
* | motions | Magenta | Cross-party analysis |
* | interpellations | Yellow | Q&A format |
* | deep-inspection | Purple | Full dashboard |
* | weekly-review | Cyan+Green | Summary + highlights |
* | monthly-review | Full spectrum | Comprehensive |
* | breaking | Red | Alert format |
* | evening-analysis | Dark/Indigo | Reflective analysis |
*
* @author Hack23 AB
* @license Apache-2.0
*/
/* ── Base article defaults (inherits global cyberpunk palette) ──────────── */
.news-article {
--type-accent: var(--primary-cyan, #00d9ff);
--type-accent-rgb: 0, 217, 255;
--type-bg: rgba(0, 217, 255, 0.04);
--type-border: var(--primary-cyan, #00d9ff);
--type-label: var(--primary-cyan, #00d9ff);
}
/* ── Week Ahead — Cyan ──────────────────────────────────────────────────── */
.news-article.article-type-week-ahead {
--type-accent: #00d9ff;
--type-accent-rgb: 0, 217, 255;
--type-bg: rgba(0, 217, 255, 0.04);
--type-border: #00d9ff;
--type-label: #00d9ff;
}
/* ── Committee Reports — Green ──────────────────────────────────────────── */
.news-article.article-type-committee-reports {
--type-accent: #00c853;
--type-accent-rgb: 0, 200, 83;
--type-bg: rgba(0, 200, 83, 0.04);
--type-border: #00c853;
--type-label: #00c853;
}
/* ── Propositions — Orange ──────────────────────────────────────────────── */
.news-article.article-type-propositions {
--type-accent: #ff8800;
--type-accent-rgb: 255, 136, 0;
--type-bg: rgba(255, 136, 0, 0.05);
--type-border: #ff8800;
--type-label: #ff8800;
}
/* ── Motions — Magenta ──────────────────────────────────────────────────── */
.news-article.article-type-motions {
--type-accent: #ff006e;
--type-accent-rgb: 255, 0, 110;
--type-bg: rgba(255, 0, 110, 0.05);
--type-border: #ff006e;
--type-label: #ff006e;
}
/* ── Interpellations — Yellow ───────────────────────────────────────────── */
.news-article.article-type-interpellations {
--type-accent: #ffbe0b;
--type-accent-rgb: 255, 190, 11;
--type-bg: rgba(255, 190, 11, 0.05);
--type-border: #ffbe0b;
--type-label: #ffbe0b;
}
/* ── Deep Inspection — Purple ───────────────────────────────────────────── */
.news-article.article-type-deep-inspection {
--type-accent: #aa00ff;
--type-accent-rgb: 170, 0, 255;
--type-bg: rgba(170, 0, 255, 0.05);
--type-border: #aa00ff;
--type-label: #aa00ff;
}
/* ── Weekly Review — Cyan + Green gradient ──────────────────────────────── */
.news-article.article-type-weekly-review {
--type-accent: #00e5cc;
--type-accent-rgb: 0, 229, 204;
--type-bg: rgba(0, 229, 204, 0.04);
--type-border: #00e5cc;
--type-label: #00e5cc;
}
/* ── Monthly Review — Amber (full spectrum represented by warm gold) ─────── */
.news-article.article-type-monthly-review {
--type-accent: #ffd600;
--type-accent-rgb: 255, 214, 0;
--type-bg: rgba(255, 214, 0, 0.04);
--type-border: #ffd600;
--type-label: #ffd600;
}
/* ── Breaking News — Red ────────────────────────────────────────────────── */
.news-article.article-type-breaking {
--type-accent: #ff1744;
--type-accent-rgb: 255, 23, 68;
--type-bg: rgba(255, 23, 68, 0.05);
--type-border: #ff1744;
--type-label: #ff1744;
}
/*
* ── Evening Analysis — Indigo/Dark ────────────────────────────────────────
* Reserved for future article type. Not yet registered in ArticleType,
* ARTICLE_TYPE_NAMES, or the template registry. The CSS custom properties
* are defined here so that they are ready to use the moment the type is
* promoted to the registry without a stylesheet release.
*/
.news-article.article-type-evening-analysis {
--type-accent: #7c4dff;
--type-accent-rgb: 124, 77, 255;
--type-bg: rgba(124, 77, 255, 0.05);
--type-border: #7c4dff;
--type-label: #7c4dff;
}
/* ── Month Ahead (alias for week-ahead palette, longer horizon) ─────────── */
.news-article.article-type-month-ahead {
--type-accent: #00b8d4;
--type-accent-rgb: 0, 184, 212;
--type-bg: rgba(0, 184, 212, 0.04);
--type-border: #00b8d4;
--type-label: #00b8d4;
}
/* ────────────────────────────────────────────────────────────────────────── */
/* Apply accent colour to key structural elements via CSS variable */
/* ────────────────────────────────────────────────────────────────────────── */
/* Article header accent stripe */
.news-article[class*="article-type-"] .article-meta {
border-top: 2px solid var(--type-accent);
padding-top: 0.5rem;
}
/* Type label badge */
.news-article[class*="article-type-"] .article-meta .type-badge {
background: rgba(var(--type-accent-rgb), 0.12);
color: var(--type-accent);
border: 1px solid rgba(var(--type-accent-rgb), 0.35);
border-radius: 4px;
padding: 0.1em 0.45em;
font-size: 0.8em;
font-weight: 600;
letter-spacing: 0.03em;
text-transform: uppercase;
}
/* Heading accent underlines within typed articles */
.news-article[class*="article-type-"] h2 {
border-left: 3px solid var(--type-accent);
padding-left: 0.6rem;
}
/* Section wrapper highlight */
.news-article[class*="article-type-"] .article-section {
border-left: 3px solid rgba(var(--type-accent-rgb), 0.3);
padding-left: 1rem;
margin-left: 0;
}
/* Override SWOT border to use type accent */
.news-article[class*="article-type-"] .swot-analysis,
.news-article[class*="article-type-"] .stakeholder-swot-analysis,
.news-article[class*="article-type-"] .article-dashboard,
.news-article[class*="article-type-"] .economic-dashboard-section,
.news-article[class*="article-type-"] .economic-dashboard-placeholder {
border-color: var(--type-accent);
}
.news-article[class*="article-type-"] .swot-analysis h2,
.news-article[class*="article-type-"] .stakeholder-swot-analysis h2,
.news-article[class*="article-type-"] .article-dashboard h2,
.news-article[class*="article-type-"] .economic-dashboard-section h2,
.news-article[class*="article-type-"] .economic-dashboard-placeholder h2 {
color: var(--type-accent);
border-bottom-color: var(--type-accent);
}
/* Mindmap override */
.news-article[class*="article-type-"] .mindmap-section {
border-color: var(--type-accent);
}
.news-article[class*="article-type-"] .mindmap-section h2,
.news-article[class*="article-type-"] .mindmap-center,
.news-article[class*="article-type-"] .mindmap-branch-label {
color: var(--type-accent);
}
.news-article[class*="article-type-"] .mindmap-center {
border-color: var(--type-accent);
box-shadow: 0 0 20px rgba(var(--type-accent-rgb), 0.25);
}
.news-article[class*="article-type-"] .mindmap-branch {
border-color: var(--type-accent);
}
/* Breaking news pulsing accent border */
.news-article.article-type-breaking {
border-top: 4px solid var(--type-accent);
animation: breaking-pulse 2s ease-in-out infinite;
}
@keyframes breaking-pulse {
0%, 100% { border-top-color: var(--type-accent); }
50% { border-top-color: rgba(var(--type-accent-rgb), 0.4); }
}
@media (prefers-reduced-motion: reduce) {
.news-article.article-type-breaking {
animation: none;
}
}
/* ── RTL support ────────────────────────────────────────────────────────── */
[dir="rtl"] .news-article[class*="article-type-"] h2 {
border-left: none;
border-right: 3px solid var(--type-accent);
padding-left: 0;
padding-right: 0.6rem;
}
/* ── Responsive: remove h2 left-border on small screens ────────────────── */
/* Placed AFTER the general RTL rule so the bottom-border treatment wins */
@media (max-width: 480px) {
.news-article[class*="article-type-"] h2 {
border-left: none;
padding-left: 0;
border-bottom: 2px solid var(--type-accent);
padding-bottom: 0.25rem;
}
/* RTL small screens also use bottom-border treatment */
[dir="rtl"] .news-article[class*="article-type-"] h2 {
border-right: none;
padding-right: 0;
}
}
[dir="rtl"] .news-article[class*="article-type-"] .article-section {
border-left: none;
border-right: 3px solid rgba(var(--type-accent-rgb), 0.3);
padding-left: 0;
padding-right: 1rem;
margin-right: 0;
}
/* ── Light mode: darken accent colours for WCAG AA contrast on white ────── */
/* Some accent colours (yellow, gold, cyan) have < 4.5:1 contrast on white.
Override with darker equivalents that still look thematically correct.
--type-accent-rgb must stay in sync so rgba() tints/borders are coherent. */
html[data-theme="light"] .news-article.article-type-week-ahead {
--type-accent: #006b8a; /* darker cyan */
--type-accent-rgb: 0, 107, 138;
--type-bg: rgba(0, 107, 138, 0.04);
--type-label: #006b8a;
}
html[data-theme="light"] .news-article.article-type-interpellations {
--type-accent: #8a6600; /* darker yellow */
--type-accent-rgb: 138, 102, 0;
--type-bg: rgba(138, 102, 0, 0.05);
--type-label: #8a6600;
}
html[data-theme="light"] .news-article.article-type-monthly-review {
--type-accent: #8a7000; /* darker gold */
--type-accent-rgb: 138, 112, 0;
--type-bg: rgba(138, 112, 0, 0.04);
--type-label: #8a7000;
}
html[data-theme="light"] .news-article.article-type-weekly-review {
--type-accent: #00806d; /* darker teal */
--type-accent-rgb: 0, 128, 109;
--type-bg: rgba(0, 128, 109, 0.04);
--type-label: #00806d;
}
html[data-theme="light"] .news-article.article-type-committee-reports {
--type-accent: #007a30; /* darker green */
--type-accent-rgb: 0, 122, 48;
--type-bg: rgba(0, 122, 48, 0.04);
--type-label: #007a30;
}
html[data-theme="light"] .news-article.article-type-month-ahead {
--type-accent: #00728a; /* darker teal */
--type-accent-rgb: 0, 114, 138;
--type-bg: rgba(0, 114, 138, 0.04);
--type-label: #00728a;
}
/* @media fallback for OS-level light preference when no explicit theme set.
Scoped to html:not([data-theme]) so manual dark/light choice always wins. */
@media (prefers-color-scheme: light) {
html:not([data-theme]) .news-article.article-type-week-ahead {
--type-accent: #006b8a;
--type-accent-rgb: 0, 107, 138;
--type-bg: rgba(0, 107, 138, 0.04);
--type-label: #006b8a;
}
html:not([data-theme]) .news-article.article-type-interpellations {
--type-accent: #8a6600;
--type-accent-rgb: 138, 102, 0;
--type-bg: rgba(138, 102, 0, 0.05);
--type-label: #8a6600;
}
html:not([data-theme]) .news-article.article-type-monthly-review {
--type-accent: #8a7000;
--type-accent-rgb: 138, 112, 0;
--type-bg: rgba(138, 112, 0, 0.04);
--type-label: #8a7000;
}
html:not([data-theme]) .news-article.article-type-weekly-review {
--type-accent: #00806d;
--type-accent-rgb: 0, 128, 109;
--type-bg: rgba(0, 128, 109, 0.04);
--type-label: #00806d;
}
html:not([data-theme]) .news-article.article-type-committee-reports {
--type-accent: #007a30;
--type-accent-rgb: 0, 122, 48;
--type-bg: rgba(0, 122, 48, 0.04);
--type-label: #007a30;
}
html:not([data-theme]) .news-article.article-type-month-ahead {
--type-accent: #00728a;
--type-accent-rgb: 0, 114, 138;
--type-bg: rgba(0, 114, 138, 0.04);
--type-label: #00728a;
}
}