Skip to content

Commit 038d85b

Browse files
committed
Further tweaks to easy days
The previous commit added word-wrap, but it was not working after I'd removed some other tweaks I'd made in testing, that I thought were not required. I ended up switching to standard table columns and a fixed layout, so that both the column and row headers will wrap properly.
1 parent 348822a commit 038d85b

File tree

1 file changed

+23
-16
lines changed

1 file changed

+23
-16
lines changed

ts/routes/deck-options/EasyDays.svelte

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,21 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
4747
<thead>
4848
<tr>
4949
<th></th>
50-
<th colspan="3">
51-
<div class="header">
52-
<span>{tr.deckConfigEasyDaysMinimum()}</span>
53-
<span>{tr.deckConfigEasyDaysReduced()}</span>
54-
<span>{tr.deckConfigEasyDaysNormal()}</span>
55-
</div>
50+
<th class="header min-col">
51+
<span>{tr.deckConfigEasyDaysMinimum()}</span>
52+
</th>
53+
<th class="header text-center">
54+
<span>{tr.deckConfigEasyDaysReduced()}</span>
55+
</th>
56+
<th class="header normal-col">
57+
<span>{tr.deckConfigEasyDaysNormal()}</span>
5658
</th>
5759
</tr>
5860
</thead>
5961
<tbody>
6062
{#each easyDays as day, index}
6163
<tr>
62-
<td>{day}</td>
64+
<td class="day">{day}</td>
6365
<td colspan="3">
6466
<input
6567
type="range"
@@ -86,26 +88,31 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
8688
.easy-days-settings table {
8789
width: 100%;
8890
border-collapse: collapse;
91+
table-layout: fixed;
8992
}
9093
.easy-days-settings th,
9194
.easy-days-settings td {
9295
padding: 8px;
93-
text-align: center;
9496
border-bottom: var(--border) solid 1px;
9597
}
9698
.header {
97-
display: grid;
98-
grid-template-columns: 1fr 1fr 1fr;
9999
word-wrap: break-word;
100100
font-size: smaller;
101101
}
102-
.header span:nth-child(1) {
103-
text-align: left;
104-
}
105-
.header span:nth-child(3) {
106-
text-align: right;
107-
}
108102
.easy-days-settings input[type="range"] {
109103
width: 100%;
110104
}
105+
106+
.day {
107+
word-wrap: break-word;
108+
font-size: smaller;
109+
}
110+
111+
.min-col {
112+
text-align: start;
113+
}
114+
115+
.normal-col {
116+
text-align: end;
117+
}
111118
</style>

0 commit comments

Comments
 (0)