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>
}
my $units = do 'sc-units.inc.pl';
- die "Cannot open unit data: $_\n" for $! || $@ || ();
+ die "Cannot open unit data: $_\n" for $@ || $! || ();
my $grouped = !exists $get{order};
if (exists $get{order}) {
$get{order} ||= '';
'<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},