browser: presentational update
authorMischa POSLAWSKY <perl@shiar.org>
Wed, 10 Nov 2010 00:59:55 +0000 (01:59 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Wed, 10 Nov 2010 21:40:55 +0000 (22:40 +0100)
base.css
browser.plp

index fa09e8e93e176fd986108e2b1954aa4ad5f2ea7e..ededb5599a5bf6400fcc6c7bae8a8b589b671176 100644 (file)
--- a/base.css
+++ b/base.css
@@ -217,25 +217,28 @@ th {
 
 /* digraphs map */
 
 
 /* digraphs map */
 
-table.glyphs.dimap {
+table.dimap {
        table-layout: fixed; /* prevent resizing, notably in msie6 */
 }
        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 */
 }
        /* 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 */
 }
 
        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 */
 }
        border: 2px double #888; /* major character group grid */
 }
-.glyphs.dimap tbody {
+.mapped tbody,
+.dimap tbody {
        border-width: 2px 0; /* horizontal group dividers */
 }
        border-width: 2px 0; /* horizontal group dividers */
 }
-.glyphs.dimap colgroup {
+.mapped colgroup,
+.dimap colgroup {
        border-width: 0 2px; /* vertical divides */
 }
 
        border-width: 0 2px; /* vertical divides */
 }
 
index 7e52a03bf07584a5129b5b05de7fe0a61c8aaf71..151daebb8f8821a858f7abed7839425c53573390 100644 (file)
@@ -57,7 +57,7 @@ my %CSTATUS = (
        rec   => 'di-a', # recommendation
        ietf  => 'di-aa', # standard
 );
        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} }) {
 my %versions;
 if (my ($somerow) = values %{ $caniuse->{data} }) {
        while (my ($browser, $row) = each %{ $somerow->{stats} }) {
@@ -65,19 +65,19 @@ if (my ($somerow) = values %{ $caniuse->{data} }) {
        }
 }
 
        }
 }
 
-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>';
 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>';
 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 {
 print "</thead>\n";
 
 sub featurescore {
@@ -110,8 +110,17 @@ for my $id (sort {
        my $row = $caniuse->{data}->{$id};
        my $data = $row->{stats} or next;  # skip metadata [summary]
        printf '<tr id="%s">', $id;
        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) {
        for my $browser (@browsers) {
                my ($prev, @span);
                for my $ver (@{ $versions{$browser} }, undef) {