latin: improve word wrapping for tap, chromacons
authorMischa POSLAWSKY <perl@shiar.org>
Wed, 12 Apr 2017 23:45:00 +0000 (01:45 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Thu, 25 May 2017 19:53:54 +0000 (21:53 +0200)
latin.plp
writing-latn.inc.pl

index 25d8b1027e2185e35872df02bb740c97f7d4d643..46e985f55d2a06802d5394b20544973c3e8e9271 100644 (file)
--- a/latin.plp
+++ b/latin.plp
@@ -40,6 +40,7 @@ Html({
                vertical-align: middle;
                text-align: left;
                padding: 1px 0.3em;
                vertical-align: middle;
                text-align: left;
                padding: 1px 0.3em;
+               white-space: normal;
        }
 </style>
 
        }
 </style>
 
index 35ab1ab49739b2399e007c8bade872a6d0b9896b..aa0e4448bb76d643e494bfe748d98ff857ac2334 100644 (file)
@@ -12,9 +12,9 @@ my %C = (
 my $U = 0;  # optional unicode alternatives
 
 my @wrapstyle = (
 my $U = 0;  # optional unicode alternatives
 
 my @wrapstyle = (
-       'td { white-space: normal; word-spacing: 5em }', # force line break between words
+       'td { white-space: normal; word-spacing: 10em }', # force line break between words
        '.sample { word-spacing: 0 }',
        '.sample { word-spacing: 0 }',
-       '.sample span { margin-right: 1ex; white-space: nowrap }', # larger space between letters
+       '.sample span { margin-right: 1ex; white-space: nowrap; display: inline-block }', # larger space between letters
 );
 my $spacestyle = '.sample span { margin-right: 0.5ex }';  # separate multiple letters
 my @tapstyle = (
 );
 my $spacestyle = '.sample span { margin-right: 0.5ex }';  # separate multiple letters
 my @tapstyle = (
@@ -596,12 +596,13 @@ nyctographs => {
        ],
 },
 chromacons => {
        ],
 },
 chromacons => {
+#      style => '.sample { word-break: break-all }',
        list => [
                # Colour Alphabet by Paul Green-Armytage (2010)
                map {
                        sprintf('<span%s>%s</span>',
                                !!$_ && sprintf(' style="background:#%s" title="%s"', split /:/),
        list => [
                # Colour Alphabet by Paul Green-Armytage (2010)
                map {
                        sprintf('<span%s>%s</span>',
                                !!$_ && sprintf(' style="background:#%s" title="%s"', split /:/),
-                               chr(8195), # em space
+                               chr(8195) . (!$_ && chr(8203)) # em space (plus zwsp for spaces)
                        );
                }
                qw{
                        );
                }
                qw{