Skip to content

Commit 537b4fd

Browse files
committed
Add a few styles for narrower screens
1 parent 8f010ed commit 537b4fd

File tree

2 files changed

+34
-17
lines changed

2 files changed

+34
-17
lines changed

apps/web/src/css/lookup.css

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,29 @@
11
.center {
22
display: flex;
33
flex-direction: column;
4-
justify-content: center;
5-
align-items: center;
4+
gap: 1rem;
65
}
76

87
#lookup-container {
98
.status-bar {
109
width: 100%;
1110
justify-content: center;
12-
padding: 0.5rem;
11+
padding: 0.5rem 0;
1312
margin-bottom: 1rem;
13+
overflow-x: auto;
14+
1415
& input {
1516
font-size: 1.1rem;
1617
}
1718
}
19+
20+
.table-wrapper {
21+
overflow-x: auto;
22+
}
23+
24+
.table-wrapper table {
25+
margin: 0;
26+
}
1827
}
1928

2029
#lookup-container pre {
@@ -30,3 +39,9 @@
3039
padding: 2px 6px;
3140
display: inline-block;
3241
}
42+
43+
@media screen and (min-width: 1440px) {
44+
.center {
45+
align-items: center;
46+
}
47+
}

apps/web/src/lookup.ts

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,22 @@ export function renderLookupTable() {
5555
<input type="search" placeholder="Filter" autocomplete="off" .value=${query.value} @input=${handleSearch} />
5656
</div>
5757
</div>
58-
<table class="ansi-codes">
59-
<thead>
60-
<tr>
61-
<th>code</th>
62-
<th>type</th>
63-
<th>mnemonic</th>
64-
<th>description</th>
65-
<th>example</th>
66-
</tr>
67-
</thead>
68-
<tbody id="ansi-codes-tbody">
69-
${rows.value}
70-
</tbody>
71-
</table>
58+
<div class="table-wrapper">
59+
<table class="ansi-codes">
60+
<thead>
61+
<tr>
62+
<th>code</th>
63+
<th>type</th>
64+
<th>mnemonic</th>
65+
<th>description</th>
66+
<th>example</th>
67+
</tr>
68+
</thead>
69+
<tbody id="ansi-codes-tbody">
70+
${rows.value}
71+
</tbody>
72+
</table>
73+
</div>
7274
7375
<p>
7476
Something missing or incorrect?

0 commit comments

Comments
 (0)