Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox dropdown option font-size not being rendered

Tags:

I need to increase the font for the <option> of a <select> list. While this works easily in Chrome, in Firefox the only thing that is being increased is the selected option. My Firefox version is 50.1.0

Referring to this fiddle, I obtain the following different results:

Firefox:Chrome result

Chrome:Firefox result

select {
  font-size: 200%;
}
<select>
    <option value="1">One</option>
    <option value="2">Two</option>
</select>

I'm expecting to obtain the same behaviour of Chrome also in Firefox.

like image 535
Mark Avatar asked Dec 20 '16 14:12

Mark


People also ask

What happens when I change the font size in Firefox?

If you change font size in your Firefox browser, only the font size of on-page content will change. However, if you zoom in or out to change font size, the display size of every other on-page element will also change accordingly.

How do I change the font size on my zoom page?

Look to the Zoom section of the menu. Click on the minus (-) icon to reduce the font size to a minimum of 30 percent. Click on the plus sign (+) to increase the font size to a maximum of 500 percent. Click outside of the dropdown menu to exit.

Does Firefox need hardware acceleration to improve font smoothing?

Firefox definitely needs hardware acceleration (on Windows, using Direct2D) enabled for best results in font smoothing. (Attached is how I think it is supposed to look. In the heading, the site is halving the font weight as downloaded, which makes it more fragile than usual.)

How do I change the font size on my keyboard?

How to Change Font Size Using Your Keyboard and Mouse 1 Once you arrive on a web page, press and hold the Ctrl key and move your mouse wheel up to increase font size. 2 To decrease font size, press and hold the Ctrl key, and move your mouse wheel down to reduce font size. 3 Press Ctrl + 0 to return to the default font size.


2 Answers

This is a bug in Firefox but still not fixed.

They said it was resolved, but the issue still exists.

Disable Multi-Process and it will work fine.

How to disable Multi-Process: (from LINK):

Go to about:config. Search for "browser.tabs.remote.autostart". There may be multiple results. Set them all to false and restart the browser.

Bug Link:

https://bugzilla.mozilla.org/show_bug.cgi?id=910022

like image 51
Hope Mystery Avatar answered Nov 07 '22 17:11

Hope Mystery


After doing a little bit of snooping around I see that some people have reported this issue in newer versions of Firefox. I myself use the development version and I have the same issue as you.

This article by the guys over at Mozilla is quite interesting in this regard.

There's a section on select box styling over mutliple browsers/devices, but your options look thin.

Normally CSS attributes like -moz-appearance: none can help but in this case I can't see a work around, I've seen reports of this being a bug in newer versions of Firefox, so fingers crossed it's gone soon. Good luck!

like image 45
Ian Taylor Avatar answered Nov 07 '22 16:11

Ian Taylor