From: Mischa POSLAWSKY Date: Thu, 11 Nov 2010 21:42:52 +0000 (+0100) Subject: style: generic naming scheme for support classes X-Git-Tag: v1.4~102 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/4af2c4c329f1a501831734ce6e7e867bf1d26b9d style: generic naming scheme for support classes Rename specific di-* digraph identifiers to basic support classes l?. Remaining di-* classes mostly become generic unicode character markers u-*. --- diff --git a/Shiar_Sheet/FormatChar.pm b/Shiar_Sheet/FormatChar.pm index a806258..c123506 100644 --- a/Shiar_Sheet/FormatChar.pm +++ b/Shiar_Sheet/FormatChar.pm @@ -6,7 +6,7 @@ use warnings; use Data::Dump 'pp'; use PLP::Functions 'EscapeHTML'; -our $VERSION = '1.03'; +our $VERSION = '1.04'; our $diinfo = do 'digraphs.inc.pl'; our %di = map { $diinfo->{$_}->[0] => $_ } grep { ref $diinfo->{$_} } @@ -71,39 +71,39 @@ sub cell { $cell = ''; } elsif ($input eq '=') { - push @class, 'di-invalid'; + push @class, 'u-invalid'; $cell = ''; } else { push @class, 'X'; if ($input =~ s/^-//) { - push @class, 'di-rare'; # discouraged + push @class, 'ex'; # discouraged } ($cell, $title, my $class, $mnem) = $self->glyphs_html($input); if ($self->{digraph}) { if (defined $mnem) { - push @class, 'di-d'; # digraph - push @class, 'di-prop' if $class =~ /\bXz\b/; # unofficial + push @class, $class =~ /\bXz\b/ ? ('l2', 'u-prop') # unofficial + : ('l4', 'u-di'); # standard digraph } } else { my $codepoint = ord(substr $input, 0, 1); if ($codepoint <= 0xFF) { - push @class, 'di-d'; # latin1 + push @class, 'l4', 'u-lat1'; # latin1 } elsif ($codepoint <= 0xD7FF) { - push @class, 'di-prop'; # bmp + push @class, 'l2', 'u-bmp'; # bmp } } if ($input =~ /[ -~]/) { - push @class, 'di-a'; # ascii + push @class, 'l5', 'u-ascii'; # ascii } else { - push @class, 'di-b'; # basic unicode + push @class, 'l0'; # basic unicode } } diff --git a/base.css b/base.css index ededb55..d4e3758 100644 --- a/base.css +++ b/base.css @@ -322,14 +322,17 @@ td.Xr {color: #888} /* reserved (digraph reverse or proposa .dimap td.Xr {background: #EEE} /* reversed digraph */ .ccmap td.Xr {opacity:.4} -/* implementation-based alternatives */ -td.di-b {background: #FDD} /* bmp */ -td.di-d {background: #FFD} /* rfc-1345 digraph */ -td.di-prop {background: #FED} /* proposed digraph */ -td.di-a {background: #EFD} /* ascii */ -td.di-aa {background: #DFD} /* ascii */ -td.di-rare {background: #EEE} /* disfavoured */ -td.di-invalid {background: #BBB} /* impossible */ +/* support levels */ +td.l0 {background: #FDD} /* no, unsupported, other */ +td.l2 {background: #FED} /* partial, restricted, unofficial */ + /* default u-prop, u-bmp */ +td.l4 {background: #FFD} /* almost, imperfect, common */ + /* default u-di, u-lat1 */ +td.l5 {background: #EFD} /* yes, supported, ubiquitous, native */ + /* default u-ascii */ +td.l6 {background: #DFD} /* complete, perfect */ +td.ex {background: #EEE} /* experimental, disfavoured */ +td.u-invalid {background: #BBB} /* invalid, impossible */ /* code syntax */ .sy-comment { color: #888 } @@ -343,7 +346,7 @@ td.di-invalid {background: #BBB} /* impossible */ .sy-todo { background-color: #FF0 } /* hover effects */ -td.di-d, +td.u-di, td.X:hover {cursor: help} td.Greek:hover, td.Armenian:hover {background: #FA8} td.Cyrillic:hover {background: #FB7} @@ -374,12 +377,12 @@ td.Xr:hover {background: #FFF} /* reserve td.Xa:hover {outline: 1px solid #0F0} /* ascii */ td.Xl:hover {outline: 1px solid #0C0} /* latin1 */ td.Xz:hover {outline: 1px solid #F00} /* proposed */ -td.di-rare:hover {background: #BBB} -td.di-b:hover {background: #F88} -td.di-d:hover {background: #FF8} -td.di-prop:hover {background: #FC8} -td.di-a:hover {background: #CF8} -td.di-aa:hover {background: #8F8} +td.l0:hover {background: #F88} +td.l2:hover {background: #FC8} +td.l4:hover {background: #FF8} +td.l5:hover {background: #CF8} +td.l6:hover {background: #8F8} +td.ex:hover {background: #BBB} /* key type colorization */ diff --git a/browser.plp b/browser.plp index b82f5fb..29002d0 100644 --- a/browser.plp +++ b/browser.plp @@ -24,22 +24,22 @@ browser usage statistics.

my $caniuse = do 'browser-support.inc.pl' or die $! || $@; my %CSTATS = ( - n => 'di-b', - y => 'di-aa', - a => 'di-d', - 'a x' => 'di-d', - j => 'di-prop', - p => 'di-prop', - 'p j' => 'di-prop', - 'y x' => 'di-a', + 'n' => 'l0', + 'y' => 'l6', + 'y x' => 'l5', + 'a' => 'l4', + 'a x' => 'l4', + 'p j' => 'l2', + 'j' => 'l2', + 'p' => 'l2', ); my %CSTATUS = ( - unoff => 'di-rare', # unofficial - wd => 'di-b', # draft - pr => 'di-prop', # proposed - cr => 'di-d', # candidate - rec => 'di-a', # recommendation - ietf => 'di-aa', # standard + unoff => 'ex', # unofficial + wd => 'l0', # draft + pr => 'l2', # proposed + cr => 'l4', # candidate + rec => 'l5', # recommendation + ietf => 'l6', # standard ); my @browsers = qw(trident gecko webkit_saf webkit_chr presto); my %versions; @@ -199,11 +199,11 @@ alert(t);
-
supported - prefixed - partial - external (js/plugin) - missing + supported + prefixed + partial + external (js/plugin) + missing
diff --git a/charset-utf8.inc.pl b/charset-utf8.inc.pl index c751e6d..0edd2e7 100644 --- a/charset-utf8.inc.pl +++ b/charset-utf8.inc.pl @@ -1,23 +1,23 @@ my %utf8byte = ( - 0x00, 'single byte ASCII', - 0x80, 'multi-byte continuation', - 0xC0, '(overl.)', - 0xC2, '2-byte sequence start', - 0xD0, '', - 0xE0, '3-byte sequence start', - 0xF0, '4-byte sequence', - 0xF5, '(overflow)', - 0xF8, '5-byte', - 0xFC, '6-byte', 0xFE, 'invalid', ); diff --git a/circus.css b/circus.css index 6e94e3b..95a7485 100644 --- a/circus.css +++ b/circus.css @@ -1,16 +1,16 @@ @import url(base.css); @import url(terse.css) all and (max-width: 80em); -td.di-b {background: #F77} /* bmp */ -td.di-b:hover { color: #F77; background: #000} -td.di-d {background: #FF6} /* rfc-1345 digraph */ -td.di-d:hover { color: #FF6; background: #000} -td.di-prop {background: #FC6} /* proposed digraph */ -td.di-prop:hover { color: #FC6; background: #000} -td.di-a {background: #CF8} /* ascii */ -td.di-a:hover { color: #CF8; background: #000} -td.di-aa {background: #8F8} -td.di-aa:hover { color: #8F8; background: #000} +td.l0 {background: #F77} +td.l0:hover { color: #F77; background: #000} +td.l2 {background: #FC6} +td.l2:hover { color: #FC6; background: #000} +td.l4 {background: #FF6} +td.l4:hover { color: #FF6; background: #000} +td.l5 {background: #CF8} +td.l5:hover { color: #CF8; background: #000} +td.l6 {background: #8F8} +td.l6:hover { color: #8F8; background: #000} td.Co {background: #DBB} /* private */ td.c-na, diff --git a/dark.css b/dark.css index b581104..8c06973 100644 --- a/dark.css +++ b/dark.css @@ -55,13 +55,13 @@ td.Xr {background: #111} /* reverse */ td.Co {background: #322} /* private */ /* implementation-based alternatives */ -td.di-b {background: #411} /* bmp */ -td.di-d {background: #330} /* rfc-1345 digraph */ -td.di-prop {background: #321} /* proposed digraph */ -td.di-a {background: #030} /* ascii */ -td.di-aa {background: #00331D} /* ascii */ -td.di-rare {background: #222} /* disfavoured */ -td.di-invalid {background: #333} /* impossible */ +td.l0 {background: #411} /* bmp */ +td.l2 {background: #321} /* proposed digraph */ +td.l4 {background: #330} /* rfc-1345 digraph */ +td.l5 {background: #030} /* ascii */ +td.l6 {background: #00331D} /* ascii */ +td.ex {background: #222} /* disfavoured */ +td.u-invalid {background: #333} /* impossible */ /* general colorization */ diff --git a/darklite.css b/darklite.css index 41c915e..4c33f0a 100644 --- a/darklite.css +++ b/darklite.css @@ -23,16 +23,16 @@ td.X {background: #000} /* unidentified */ td.Xr {background: #111} /* reverse */ td.Co {background: #181111} /* private */ -.mo, td.c-as, td.di-b {background: #200} -.co, td.c-af, td.di-d {background: #1C1C00} -.cp, td.c-eu, td.di-prop {background: #221400} -.pm, td.c-na, td.di-a {background: #002200} -.po {} -.ci, td.c-sa {background: #001A1A} -.mi {} -.mv, td.c-oc {background: #012} -.me, td.c-aa {background: #102} -.no {} - td.di-rare {background: #181818} /* disfavoured */ - td.di-invalid {background: #222} /* impossible */ +.mo, td.c-as, td.l0 {background: #200} +.co, td.c-af, td.l4 {background: #1C1C00} +.cp, td.c-eu, td.l2 {background: #221400} +.pm, td.c-na, td.l5 {background: #002200} +.po {} +.ci, td.c-sa {background: #001A1A} +.mi {} +.mv, td.c-oc {background: #012} +.me, td.c-aa {background: #102} +.no {} + td.ex {background: #181818} +td.u-invalid {background: #222} diff --git a/red.css b/red.css index e953f5b..373fe76 100644 --- a/red.css +++ b/red.css @@ -80,7 +80,7 @@ dt.pm, dt.mv, color: #FF0; } /* mode link */ -td.di-b, +td.l0, td.X { /* unidentified */ background: #000; border-color: #800; @@ -109,12 +109,12 @@ tbody, colgroup, th { } /* implementation-based alternatives */ -td.di-b {background: #000; color: #DD6} /* bmp */ -td.di-d {background: #000; color: #CCC} /* rfc-1345 digraph */ -td.di-prop {background: #000; color: #CA8} /* proposed digraph */ -td.di-a {background: #000; color: #8BC} /* ascii */ -td.di-rare {background: #333} /* disfavoured */ -td.di-invalid {background: #200} /* impossible */ +td.l0 {background: #000; color: #DD6} +td.l4 {background: #000; color: #CCC} +td.l2 {background: #000; color: #CA8} +td.l5 {background: #000; color: #8BC} +td.ex {background: #333} +td.u-invalid {background: #200} /* impossible */ /* continents */ td.c-af {background: #100; color: #FFF} @@ -124,7 +124,7 @@ td.c-aa {background: #400; color: #8BC} td.c-oc {background: #100; color: #8BC} td.c-sa {background: #100; color: #DD6} td.c-na {background: #300; color: #DD6} -td.di-b:hover, +td.l0:hover, td.X:hover {background: #800; color: #FF0} /* code syntax */ diff --git a/unicode.plp b/unicode.plp index c9f8ef1..70f13e6 100644 --- a/unicode.plp +++ b/unicode.plp @@ -211,11 +211,11 @@ $verbose ? (
-
ascii - <:= $glyphs->{digraph} ? 'digraph' : 'latin1' :> - <:= $glyphs->{digraph} ? 'proposed' : 'BMP' :> - other unicode - discouraged + ascii + <:= $glyphs->{digraph} ? 'digraph' : 'latin1' :> + <:= $glyphs->{digraph} ? 'proposed' : 'BMP' :> + other unicode + discouraged