How can I override the minimum-font-size in Firefox?

后端 未结 8 1549
醉酒成梦
醉酒成梦 2020-12-14 22:35

My site displays just like in need in IE and Opera, but in Firefox I can\'t get (via CSS) to have font sizes smaller than Firefox\' default minimum-font-size. Of course I ca

8条回答
  •  攒了一身酷
    2020-12-14 23:23

    Just in case it might help anyone, I ended up replacing the small text areas, initially in HTML, with SVG zones. I fill these zones with the Raphaël JS library, with code like

    logo_text = $j("#logo_text").val();
    logo_text_preview_paper.clear();
    logo_text_preview_paper.text(0, 4, logo_text).attr({"font-family": 'Helvetica', "font-size": 7, "text-anchor": 'start'});
    

    I did not use an HTML canvas, because of its lack of availability on certain browsers, and because SVG offers a much better user experience on Retina displays.

    It might seem overkill to do that, but I was not able to find an easier solution to the Minimum Font Size problem of FF.

提交回复
热议问题