latin: inherit foreground colour for svg paths
authorMischa POSLAWSKY <perl@shiar.org>
Mon, 21 Sep 2015 16:19:25 +0000 (18:19 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 21 Sep 2015 22:20:08 +0000 (00:20 +0200)
Fix visibility in dark style.

writing-latn.inc.pl

index 28626b06fb63487d9e47ffe66a52f58c3b27db78..917ae119389a9ee9c2d6333c9f4e428a1251cb52 100644 (file)
@@ -70,7 +70,7 @@ my %C = qw(red #EC1C24  blue #3953A3  yellow #F9EC31  black #231F20);
                <path fill="white" d="M0,0 h15 v30 h-15"/>
 
                <path fill="$C{yellow}" d="M0,0 h30v30 h-30z"/>
-               <circle fill="black" r="7.5" cx="15" cy="15"/>
+               <circle fill="$C{black}" r="7.5" cx="15" cy="15"/>
 
                <path fill="$C{blue}" d="M0,0 h30v30 h-30z"/>
                <path fill="white" d="M0,10 h30 v10 h-30"/>
@@ -156,8 +156,8 @@ my %C = qw(red #EC1C24  blue #3953A3  yellow #F9EC31  black #231F20);
                !$_ ? '-' : sprintf(
                        join('',
                                '<svg width="20" height="20" viewBox="0 0 10 15">',
-                               '<path stroke="black" d="M5,6 v7"/>',
-                               '<path stroke="black" fill="none" d="M0,%s h10 %s" transform="rotate(%d 5 6)"/>',
+                               '<path stroke="currentColor" d="M5,6 v7"/>',
+                               '<path stroke="currentColor" fill="none" d="M0,%s h10 %s" transform="rotate(%d 5 6)"/>',
                                '</svg>',
                        ),
                        ['6', '3v3', '9v-3']->[$pl],
@@ -176,10 +176,10 @@ my %C = qw(red #EC1C24  blue #3953A3  yellow #F9EC31  black #231F20);
        map { !$_ ? '-' : sprintf
                join('',
                        '<svg width="20" height="20" viewBox="0 0 8 18">',
-                       '<path stroke="black" d="M4,1 v18"/>',
+                       '<path stroke="currentColor" d="M4,1 v18"/>',
                        (map {(
-                               qq(<path stroke="black" d="M0 $_ h4" transform="rotate(%d 4 $_)"/>),
-                               qq(<path stroke="black" d="M4 $_ h4" transform="rotate(-%d 4 $_)"/>),
+                               qq(<path stroke="currentColor" d="M0 $_ h4" transform="rotate(%d 4 $_)"/>),
+                               qq(<path stroke="currentColor" d="M4 $_ h4" transform="rotate(-%d 4 $_)"/>),
                        )} 3, 7, 14),
                        '</svg>',
                ),
@@ -203,7 +203,7 @@ my %C = qw(red #EC1C24  blue #3953A3  yellow #F9EC31  black #231F20);
 '<abbr title="Royal Mail 4-State Customer Code">RM4SCC</abbr>' => [
        map { sprintf
                '<svg width="20" height="20" viewBox="0 0 8 6">'
-               . '<path stroke="black" d="M1%s"/></svg>',
+               . '<path stroke="currentColor" d="M1%s"/></svg>',
                join ' m2',
                map { sprintf ',%dv%dm0,-%d',
                        ($_ & 1 ? 0 : 2),  2 + ($_ & 2) + ($_ & 1) * 2,
@@ -232,7 +232,7 @@ my %C = qw(red #EC1C24  blue #3953A3  yellow #F9EC31  black #231F20);
                m/h/ or s/v/l3,/g;
                m/v/ or s/h([^h]*)/l$1,3/g;
                my $dot = s/\.// && qq(<circle cx="3" cy="3" r="1">);
-               qq(<path stroke="black" stroke-linecap="square" fill="none" d="$_"/>$dot)
+               qq(<path stroke="currentColor" stroke-linecap="square" fill="none" d="$_"/>$dot)
        }
        qw(
                Hvh  vhv  vh  hvh  vhvh  Hhvh  hv  Vvhv  Hhv
@@ -246,7 +246,7 @@ my %C = qw(red #EC1C24  blue #3953A3  yellow #F9EC31  black #231F20);
        map { sprintf
                '<svg width="14" height="14" viewBox="-.5 -.5 5 5">'
                . '<path%s d="M0,0%s %s4,0 %s4,4 %s0,4 %s0,0"/></svg>',
-               ' stroke="black" stroke-linecap="round" stroke-linejoin="round" fill="none"',
+               ' stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" fill="none"',
                'h.5v.5h-.5v-.5',  # start anchor
                map { ['M', 'h0M', 'L']->[$_] }
                split //, $_