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.
This commit is contained in:
Damien Elmes 2025-02-11 17:04:58 +07:00
parent 348822a14b
commit 038d85b1d9

View file

@ -47,19 +47,21 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
<thead> <thead>
<tr> <tr>
<th></th> <th></th>
<th colspan="3"> <th class="header min-col">
<div class="header">
<span>{tr.deckConfigEasyDaysMinimum()}</span> <span>{tr.deckConfigEasyDaysMinimum()}</span>
</th>
<th class="header text-center">
<span>{tr.deckConfigEasyDaysReduced()}</span> <span>{tr.deckConfigEasyDaysReduced()}</span>
</th>
<th class="header normal-col">
<span>{tr.deckConfigEasyDaysNormal()}</span> <span>{tr.deckConfigEasyDaysNormal()}</span>
</div>
</th> </th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{#each easyDays as day, index} {#each easyDays as day, index}
<tr> <tr>
<td>{day}</td> <td class="day">{day}</td>
<td colspan="3"> <td colspan="3">
<input <input
type="range" type="range"
@ -86,26 +88,31 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
.easy-days-settings table { .easy-days-settings table {
width: 100%; width: 100%;
border-collapse: collapse; border-collapse: collapse;
table-layout: fixed;
} }
.easy-days-settings th, .easy-days-settings th,
.easy-days-settings td { .easy-days-settings td {
padding: 8px; padding: 8px;
text-align: center;
border-bottom: var(--border) solid 1px; border-bottom: var(--border) solid 1px;
} }
.header { .header {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
word-wrap: break-word; word-wrap: break-word;
font-size: smaller; font-size: smaller;
} }
.header span:nth-child(1) {
text-align: left;
}
.header span:nth-child(3) {
text-align: right;
}
.easy-days-settings input[type="range"] { .easy-days-settings input[type="range"] {
width: 100%; width: 100%;
} }
.day {
word-wrap: break-word;
font-size: smaller;
}
.min-col {
text-align: start;
}
.normal-col {
text-align: end;
}
</style> </style>