/* digraphs map */
-table.glyphs.dimap {
+table.dimap {
table-layout: fixed; /* prevent resizing, notably in msie6 */
}
-.glyphs.dimap thead th, .glyphs.dimap td {
+.dimap thead th, .dimap td {
/* below-maximum size (but still average enough to be regular) so we can fit more */
width: 1.2em; /* msie only looks at the first row */
min-width: 1em; /* prevents gecko from restricting to page width */
}
-.glyphs.dimap th {
+.dimap th {
text-align: center; /* row headers are also glyph-sized */
}
-.glyphs.dimap tbody, .glyphs.dimap colgroup {
+.mapped tbody, .mapped colgroup,
+.dimap tbody, .dimap colgroup {
border: 2px double #888; /* major character group grid */
}
-.glyphs.dimap tbody {
+.mapped tbody,
+.dimap tbody {
border-width: 2px 0; /* horizontal group dividers */
}
-.glyphs.dimap colgroup {
+.mapped colgroup,
+.dimap colgroup {
border-width: 0 2px; /* vertical divides */
}
rec => 'di-a', # recommendation
ietf => 'di-aa', # standard
);
-my @browsers = qw(trident gecko webkit_saf presto);
+my @browsers = qw(trident gecko webkit_saf webkit_chr presto);
my %versions;
if (my ($somerow) = values %{ $caniuse->{data} }) {
while (my ($browser, $row) = each %{ $somerow->{stats} }) {
}
}
-print '<table class="glyphs dimap">';
-print '<col>' x 2;
+print '<table class="mapped">';
+print '<col>' x 3;
printf '<colgroup span="%d">', scalar @{ $versions{$_} } for @browsers;
print "\n";
print '<thead><tr>';
-print "<th>$_" for qw(feature status);
+print '<th colspan="3">feature';
printf '<th colspan="%d">%s',
scalar @{ $versions{$_} }, $caniuse->{agents}->{$_}->{browser}
for @browsers;
# preceding row without any colspan to work around gecko bug
print '<tr>';
-print '<td>' x $_ for 2, map { scalar @{ $versions{$_} } } @browsers;
+print '<td>' x $_ for 3, (map { scalar @{ $versions{$_} } } @browsers), 1;
print "</thead>\n";
sub featurescore {
my $row = $caniuse->{data}->{$id};
my $data = $row->{stats} or next; # skip metadata [summary]
printf '<tr id="%s">', $id;
- printf '<th title="%s">%s', $row->{description}, $row->{title};
- printf '<td title="%s" class="%s">%s', $caniuse->{statuses}->{$_}, $CSTATUS{$_} // '', $_ for $row->{status};
+ for ($row->{categories}) {
+ my $cell = $_ ? lc $_->[0] : '-';
+ print '<th>', $cell;
+ }
+ printf '<td title="%s">%s', $row->{description}, $row->{title};
+ for ($row->{status}) {
+ my $cell = $_ // '-';
+ $cell = sprintf '<a href="%s">%s</a>', $_, $cell for $row->{spec} // ();
+ printf '<td title="%s" class="%s">%s',
+ $caniuse->{statuses}->{$_}, $CSTATUS{$_} // '', $cell;
+ }
for my $browser (@browsers) {
my ($prev, @span);
for my $ver (@{ $versions{$browser} }, undef) {