SVG's `dominant-baseline` confuses Edge and IE
authorAlexander Ebert <ebert@woltlab.com>
Thu, 19 Oct 2017 10:53:25 +0000 (12:53 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 19 Oct 2017 10:53:31 +0000 (12:53 +0200)
wcfsetup/install/files/lib/data/user/avatar/DefaultAvatar.class.php

index ded97a0cc96c1f284df248ef52068be6efb18a00..094863f33d2ba0cd379ac923f51620ce78118aa5 100644 (file)
@@ -56,7 +56,7 @@ class DefaultAvatar implements IUserAvatar {
                        
                        // the <path> is basically a shorter version of a <rect>
                        $svg = <<<SVG
-<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="#{$backgroundColor}" d="M0 0h16v16H0z"/><text x="8" y="8" fill="#{$textColor}" text-anchor="middle" dominant-baseline="central" font-family="Arial" font-size="7">{$text}</text></svg>
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="#{$backgroundColor}" d="M0 0h16v16H0z"/><text x="8" y="8" fill="#{$textColor}" text-anchor="middle" dy=".3em" font-family="Arial" font-size="7">{$text}</text></svg>
 SVG;
                        
                        $this->src = "data:image/svg+xml;base64," . base64_encode($svg);