border-collapse: separate;
border-spacing: 0;
margin: 0 auto;
+ white-space: nowrap;
}
.units th, .units td {
border: 0;
margin: 0;
text-align: center;
}
- .units th.cat {
- font-size: 70%;
- text-transform: uppercase;
- }
.units thead th, .units tfoot th {
font-size: 70%;
font-weight: normal;
text-align: right;
}
- .legend dl {
- text-align: left;
- -moz-column-width: 20em;
- -webkit-column-width: 20em;
- }
.legend dt {
+ float: none;
+ text-align: left;
margin-top: 1ex;
font-weight: bold;
}
}
.legend dd {
text-indent: -1em;
- margin-left: 2em;
+ margin-left: 1em;
break-before: avoid;
- break-inside: avoid;
-webkit-column-break-before: avoid;
}
+
+ .units, .legend {
+ display: table-cell;
+ }
+ .legend {
+ min-width: 15em;
+ padding-left: 2em;
+ text-align: left;
+ }
</style>
<:
<thead><tr>
<th></th>
<th><:= coltoggle('name', '') :></th>
- <th class="val min"><img src="minerals.png" alt="min"></th>
- <th class="val gas"><img src="gas.png" alt="gas"></th>
+ <th class="val min"><img src="/minerals.png" alt="min"></th>
+ <th class="val gas"><img src="/gas.png" alt="gas"></th>
<th class="val time"><:= coltoggle(qw'build cost') :></th>
<th class="unit" colspan="2"><:= coltoggle(qw'size size') :></th>
<th class="val unit-hp">HP</th>
<th class="val unit-speed">speed</th>
<th class="unit-magic">specials</th>
</tr></thead>
-<tbody>
<:
sub showrange {
my ($row, @elements) = @_;
my ($race, $cat) = ('', '');
for (@rows) {
$race = $_->{race},
- printf '</tbody><tbody id="%s"><tr class="race"><th colspan="18"><h2>%s</h2>'."\n", $race, ucfirst $race
+ printf '<tbody id="%s"><tr class="race"><th colspan="18"><h2>%s</h2>'."\n", $race, ucfirst $race
if $grouped and $race ne $_->{race};
$_->{cat} = $_->{race} if not $grouped;
my $sizechar = [qw/? s m l/]->[$_->{size}];
'<td class="val unit">' . join('',
$_->{unit} ? $_->{unit} == .5 ? '½' : $_->{unit} : ' ',
defined $_->{organic} && sprintf(
- '<img class="unit-%s" src="s%s.png" alt="%s">',
+ '<span class="unit-%s" title="%s">%s</span>',
$_->{organic} ? 'o' : 'u',
- $_->{race} . ($_->{organic} ? 'o' : ''),
- $_->{organic} ? 'o' : 'm'
+ $_->{organic} ? 'organic' : 'mechanic',
+ $_->{organic} ? 'o' : 'm',
),
),
'<td class="val unit-hp">' . $_->{hp},
}
}
:>
-</tbody>
</table>
<div class="legend">