From add39cddddaf48676f1dd0f9158533be2fdd7459 Mon Sep 17 00:00:00 2001
From: Mischa POSLAWSKY
Date: Thu, 23 Mar 2017 02:31:15 +0100
Subject: [PATCH] digraphs: reclassify vim support levels
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit
Instead of custom u-* classes, reuse common l1-5 in include:
.u-di â l4 (vim + rfc)
.u-prop â l3 (vim)
.u-prop.ex â l2 (shiar)
.ex â l1 (rfc only)
Prepend u- on page to avoid conflicting with script styling (leave
background colour unaltered).
Loses ascii/latin1 distinction, but clarifies (vim) compatibility and
allows for easier extension later on.
---
base.css | 20 ++++++++++----------
digraphs.plp | 16 +++++++---------
tools/mkdigraphlist | 8 ++++----
3 files changed, 21 insertions(+), 23 deletions(-)
diff --git a/base.css b/base.css
index fe9a6b2..3b196fc 100644
--- a/base.css
+++ b/base.css
@@ -344,12 +344,7 @@ table.dimap {
/* character properties */
.X {background: #FFF} /* unidentified */
-#digraphs .Xa {color: #0A0} /* ascii */
-#digraphs .Xl {color: #070} /* latin1 */
-#digraphs .u-prop {color: #D00} /* proposed */
-#digraphs .u-prop.ex {color: #D88; color: rgba(221, 0, 0, .5)} /* unofficial proposal */
-
-.Lm, .Mc, .Me, .Zl, .Zp {background: #F00} /* unstyled */
+.Mc, .Me, .Zl, .Zp {background: #F00} /* unstyled */
.X > span {background: #898; background: rgba(0, 0, 0, .25)} /* invisible contents */
/* letter scripts */
@@ -402,6 +397,12 @@ table.dimap {
.ex { color: #888; color: rgba(0, 0, 0, .5)} /* experimental, disfavoured */
.u-invalid {background: #BBB} /* invalid, impossible */
+/* foreground representation */
+#digraphs .u-l3 {color: #080} /* partial */
+#digraphs .u-l2 {color: #A44; color: rgba(128, 0, 0, .6)} /* unofficial proposal */
+#digraphs .u-l1 {color: #D00; color: rgba(255, 0, 0, .8)} /* minimal or invalid */
+
+/* support percentage (browser cells) */
.p0 {opacity: .6}
.p0.p {opacity: 1}
.p::after {content: '!'; color: #F00}
@@ -433,7 +434,6 @@ table.dimap {
.sy-todo { background-color: #FF0 }
/* hover effects */
-.u-di,
.X:hover {cursor: help}
.X:hover > span {background: #FFF} /* whitespace marker */
.Greek:hover, .Armenian:hover {background: #FA8}
@@ -463,15 +463,15 @@ table.dimap {
.Co:hover {background: #A77} /* private */
.Xr:hover {background: #FFF} /* reserved */
.Xi:hover {background: #DDD} /* invalid */
-.Xa:hover {outline: 1px solid #0F0} /* ascii */
-.Xl:hover {outline: 1px solid #0C0} /* latin1 */
-.u-prop:hover {outline: 1px solid #F00} /* proposed */
.l0:hover {background: #888}
.l1:hover {background: #F88}
.l2:hover {background: #FC8}
.l3:hover {background: #FF8}
.l4:hover {background: #CF8}
.l5:hover {background: #8F8}
+.u-l3:hover {outline: 1px solid #0F0}
+.u-l2:hover {outline: 1px solid #800}
+.u-l1:hover {outline: 1px solid #F00}
/* key type colorization */
diff --git a/digraphs.plp b/digraphs.plp
index 887d1ab..4fff67d 100644
--- a/digraphs.plp
+++ b/digraphs.plp
@@ -34,7 +34,7 @@ say join("\n",
),
'Also see common Unicode.
',
);
-say 'Unofficial proposals',
+say '
Unofficial proposals',
' are available as ex commands.' if not $mode;
:>
@@ -114,12 +114,12 @@ for my $c1group (@chars) {
printf '
', EscapeHTML($mnem);
next;
}
- my ($codepoint, $name, $prop, $script, $string) = @{ $di->{$mnem} };
+ my ($codepoint, $name, $support, $script, $string) = @{ $di->{$mnem} };
my $glyph = $string || chr $codepoint;
utf8::upgrade($glyph); # prevent latin1 output
my $desc = $mnem . ($name && " ($name)");
- my @class = ('X', grep {$_} $prop, $script);
+ my @class = ('X', grep {$_} $support && "u-$support", $script);
$glyph = EscapeHTML($glyph);
$glyph = "$glyph" if $script =~ /\bZs\b/;
@@ -169,12 +169,10 @@ if ($mode) {
- unicode
- | latin1
- | ascii
- | vim extension
- | proposal
- | not in vim
+ | full support
+ | vim extension
+ | proposal
+ | not in vim
|
diff --git a/tools/mkdigraphlist b/tools/mkdigraphlist
index 216be6a..ab0c2f9 100755
--- a/tools/mkdigraphlist
+++ b/tools/mkdigraphlist
@@ -6,7 +6,7 @@ use utf8;
use open OUT => ':utf8', ':std';
-our $VERSION = '1.05';
+our $VERSION = '1.06';
# import and combine various digraph data
my $rfc = do 'data/digraphs-rfc.inc.pl'
@@ -34,9 +34,9 @@ printf "q{%s}=>[%s],\n", s/(?=[\\}])/\\/gr, join(',',
ord $di->{$_}, # original code point
map {"'$_'"}
$uninfo->{ $di->{$_} }->[1] // '', # name
- $vim->{$_}
- ? $rfc->{$_} ? 'u-di' : 'u-prop' # vim+rfc or vim only
- : $rfc->{$_} ? 'ex' : 'u-prop ex', # rfc only or neither
+ $rfc->{$_}
+ ? $vim->{$_} ? 'l4' : 'l1' # vim+rfc or rfc only
+ : $vim->{$_} ? 'l3' : 'l2', # vim only or neither
($uninfo->{ $di->{$_} }->[0] // '') =~ s/ u-di| u-prop| ex//gr, # class
$uninfo->{ $di->{$_} }->[4] // (), # string
) for sort keys %{$di};
--
2.30.0
|