If several non-exclusive character attributes are present, set all relevant
style classes (and try to show the most relevant).
background: #CCC;
color: #666;
background: #CCC;
color: #666;
color: #FFF;
opacity: 0.3;
}
color: #FFF;
opacity: 0.3;
}
td.Co {background: #A99} /* private */
/* implementation-based alternatives */
td.Co {background: #A99} /* private */
/* implementation-based alternatives */
-td.Ascii {background: #EFD} /* ascii */
-td.Di {background: #FFD} /* rfc-1345 digraph */
-td.DiProp {background: #FED} /* proposed digraph */
-td.DiNone {background: #FDD} /* other unicode */
-td.Reserved {background: #BBB} /* impossible */
+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-rare {background: #EEE} /* disfavoured */
+td.di-invalid {background: #BBB} /* impossible */
td.X:hover {cursor: help}
td.Greek:hover {background: #FA9}
td.Cyrillic:hover {background: #FB7}
td.X:hover {cursor: help}
td.Greek:hover {background: #FA9}
td.Cyrillic:hover {background: #FB7}
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.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-b:hover {background: #F88}
+td.di-d:hover {background: #FF8}
+td.di-prop:hover {background: #FC8}
+td.di-a:hover {background: #CF8}
my $colspan = 1;
for my $cell (@$digraphs) {
my $colspan = 1;
for my $cell (@$digraphs) {
if ($cell =~ s/^\.//) {
# dot indicates start of a new row
push @rows, '';
if ($cell =~ s/^\.//) {
# dot indicates start of a new row
push @rows, '';
my $name = $diinfo->{$code}->[1];
# determine display class
my $name = $diinfo->{$code}->[1];
# determine display class
- if ($cell =~ s/^-//) {
-# $class = 'Empty';
+ my @class;
+ if ($cell eq '-') {
+ $cell = '';
+ push @class, 'di-invalid';
- elsif ($cell =~ /[ -~]/) {
- $class = 'Ascii';
- }
- elsif (not $code) {
- $class = 'DiNone';
- }
- elsif ($diinfo->{$code}->[2] =~ /\bXz\b/) {
- $class = 'DiProp';
- }
+ if ($cell =~ s/^-//) {
+ push @class, 'di-rare'; # discouraged
+ }
+
+ if ($code) {
+ push @class, 'di-d'; # digraph
+ push @class, 'di-prop' # unofficial
+ if $diinfo->{$code}->[2] =~ /\bXz\b/;
+ }
+
+ if ($cell =~ /[ -~]/) {
+ push @class, 'di-a'; # ascii
+ }
+ else {
+ push @class, 'di-b'; # basic unicode
+ }
}
# add cell html
$rows[-1] .= sprintf('<td%s%s%s>%s%s',
defined $name ? qq{ title="$name"} : '',
}
# add cell html
$rows[-1] .= sprintf('<td%s%s%s>%s%s',
defined $name ? qq{ title="$name"} : '',
- defined $class ? qq{ class="$class"} : '',
+ @class ? sprintf(' class="%s"', join ' ', @class) : '',
$colspan > 1 && qq{ colspan="$colspan"},
$cell eq '' ? ' ' : quote($cell),
$code ne '' ? sprintf(' <small class="digraph">%s</small>', quote($code))
$colspan > 1 && qq{ colspan="$colspan"},
$cell eq '' ? ' ' : quote($cell),
$code ne '' ? sprintf(' <small class="digraph">%s</small>', quote($code))