Skip to content

Commit a25bd8a

Browse files
committed
style: Improve table styling and color for missing status
1 parent 671d13a commit a25bd8a

2 files changed

Lines changed: 29 additions & 14 deletions

File tree

lunaria/components.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -221,14 +221,16 @@ export const StatusByFile = (
221221
<h2 id="by-file">
222222
<a href="#by-file">Translation status by file</a>
223223
</h2>
224-
<table class="status-by-file">
225-
<thead>
226-
<tr>
227-
${['File', ...locales.map(({ lang }) => lang)].map(col => html`<th>${col}</th>`)}
228-
</tr>
229-
</thead>
230-
${TableBody(status, locales, lunaria)}
231-
</table>
224+
<div class="status-by-file-wrapper">
225+
<table class="status-by-file">
226+
<thead>
227+
<tr>
228+
${['File', ...locales.map(({ lang }) => lang)].map(col => html`<th>${col}</th>`)}
229+
</tr>
230+
</thead>
231+
${TableBody(status, locales, lunaria)}
232+
</table>
233+
</div>
232234
<sup class="capitalize">❌ missing &nbsp; 🔄 outdated &nbsp; ✔ done </sup>
233235
`
234236
}

lunaria/styles.ts

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const BaseStyles = html`
2929
--ln-color-link: var(--ln-color-blue);
3030
--ln-color-done: var(--ln-color-purple);
3131
--ln-color-outdated: var(--ln-color-orange);
32-
--ln-color-missing: var(--ln-color-black);
32+
--ln-color-missing: #ef4444;
3333
--ln-color-table-border: var(--ln-color-gray-3);
3434
--ln-color-table-background: var(--ln-color-gray-1);
3535
}
@@ -112,6 +112,11 @@ export const BaseStyles = html`
112112
}
113113
114114
main {
115+
margin-inline: auto;
116+
padding-inline: 1rem;
117+
}
118+
119+
.limit-to-viewport {
115120
max-width: 60ch;
116121
margin-inline: auto;
117122
}
@@ -175,12 +180,16 @@ export const BaseStyles = html`
175180
font-size: 0.75rem;
176181
}
177182
178-
.status-by-file {
183+
.status-by-file-wrapper {
184+
overflow-x: auto;
179185
margin-bottom: 1rem;
186+
}
187+
188+
.status-by-file {
189+
width: 100%;
180190
border-collapse: collapse;
181191
border: 1px solid var(--ln-color-table-border);
182192
font-size: 0.8125rem;
183-
column-gap: 64px;
184193
}
185194
186195
.status-by-file tr:first-of-type td {
@@ -296,9 +305,9 @@ export const CustomStyles = html`
296305
--ln-color-link: #539bf5;
297306
--ln-color-table-background: var(--bg-subtle);
298307
--ln-color-table-border: var(--border);
299-
--ln-color-background: var(--theme-bg-gradient);
300-
--ln-color-black: var(--theme-text);
301-
--ln-color-missing: var(--ln-color-black);
308+
--ln-color-background: var(--bg);
309+
--ln-color-black: var(--fg);
310+
--ln-color-missing: #f87171;
302311
--ln-color-outdated: #fb923c;
303312
--ln-color-done: #c084fc;
304313
}
@@ -307,6 +316,10 @@ export const CustomStyles = html`
307316
background-color: var(--bg);
308317
}
309318
319+
body {
320+
color: var(--fg);
321+
}
322+
310323
h1,
311324
h2,
312325
h3,

0 commit comments

Comments
 (0)