use css nth-child for regions' borders

This commit is contained in:
2020-10-07 20:06:27 +02:00
parent a56d0b899d
commit 7195d84a55
2 changed files with 21 additions and 45 deletions

View File

@ -26,16 +26,6 @@
<tr>
<?php
for ($column = 0; $column < 9; $column++) {
switch($row%3) {
case 0: $classRegionRow = "regionTop"; break;
case 1: $classRegionRow = "regionMiddle"; break;
case 2: $classRegionRow = "regionBottom"; break;
}
switch($column%3) {
case 0: $classRegionColumn = "regionLeft"; break;
case 1: $classRegionColumn = "regionCenter"; break;
case 2: $classRegionColumn = "regionRight"; break;
}
$value = $gridStr[9*$row+$column];
if ($value == "?") {
$value = "";
@ -43,7 +33,7 @@
} else {
$disabled = " disabled";
}
echo " <td class='$classRegionRow $classRegionColumn'><input type='text' inputmode='numeric' minlength=0 maxlength=1 value='$value'$disabled/></td>\n";
echo " <td><input type='text' inputmode='numeric' minlength=0 maxlength=1 value='$value'$disabled/></td>\n";
}
?>
</tr>