- From: Tobi Reif via GitHub <sysbot+gh@w3.org>
- Date: Fri, 16 Feb 2018 18:06:21 +0000
- To: public-css-archive@w3.org
Here's code from a website where I used a hack to compensate the difference in glyph-positioning: (Warning: it's from an older website of mine, uses jQuery 😮) ``` (function() { /* The font rendering/spacing is different across OSs and browsers, so here goes a hack: */ var svg = $('#svg'); var javascript = $('#javascript'); var css = $('#css'); var pixi = $('#pixi'); var angular = $('#angular'); var ua = navigator.userAgent.toLowerCase(); // Firefox: if($.browser.mozilla) { angular.css({ 'margin-top': '10px', 'left': '-170px' }); } if(/windows/.test(ua)){ // Firefox: if($.browser.mozilla) { svg.css({'margin-top': '-24px'}); javascript.css({'margin-top': '-3px'}); css.css({'margin-top': '-12px'}); pixi.css({'margin-top': '36px'}); } // Chrome: if(/chrome/.test(ua)) { svg.css({'margin-top': '-22px'}); javascript.css({'margin-top': '-1px'}); css.css({'margin-top': '-12px'}); pixi.css({'margin-top': '38px'}); } // IE, Edge: if(/msie|trident|edge/.test(ua)) { svg.css({'margin-top': '-14px'}); angular.css({ 'margin-top': '10px', 'left': '-180px' }); javascript.css({'margin-top': '12px'}); css.css({'margin-top': '1px'}); pixi.css({'margin-top': '28px'}); } } }()); ``` I think the horribleness of the above hack demonstrates that a solution is required 😀 -- GitHub Notification of comment by tobireif Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2228#issuecomment-366312842 using your GitHub account
Received on Friday, 16 February 2018 18:06:23 UTC