brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.52k stars 2.27k forks source link

Remove Minimum font size setting or set to 0 as default #5510

Open simefield opened 5 years ago

simefield commented 5 years ago

Description

Brave's arbitrary Minimum font size setting breaks modern layouts and is does not achieve what it sets out to do. Setting a root-em of less than Brave's default will be over-ridden, but sometimes it is desirable, especially in modern development to use the root-em to achieve vertical rhythm in ones design. Over-riding this breaks well designed layouts. Furthermore, setting a minimum of 6 pixels is plain stupid anyway, as even at that size text in illegible. You might as well set it at 16 pixels if you are wanting to take the power away from designers and put it into users who are unable to increase their page zoom / font sizes. Brave should not be broadly over-riding good designer's work because of some bad designers out there. Websites with illegibly tiny fonts will suffer and die naturally.

Steps to Reproduce

  1. In your CSS, on the root element (html or :root) set the font-size to 4px
  2. Observe: Brave changes this to 6px by default

Actual result:

Setting an element to have padding: 4rem will result in padding: 24px.

Expected result:

Expected result is padding: 16px

Reproduces how often:

Easily reproduced.

Brave version (brave://version info)

Brave 0.66.100 Chromium: 75.0.3770.142 (Official Build) (64-bit)
Revision 8d93477bd18154c67a70a67019cb8032382c55dd-refs/branch-heads/3770@{#1160}
OS Mac OS X

Version/Channel Information:

Other Additional Information:

Miscellaneous Information:

bsclifton commented 5 years ago

cc: @bradleyrichter (this should also be happening in Chrome)

simefield commented 5 years ago

Negative. This is not an issue in Chrome, but was implemented in Brave. See: https://community.brave.com/t/desperately-needs-a-minimum-font-size-feature/14983

bradleyrichter commented 5 years ago

The UI control allows 0 but it seems to be ignored, ni both Brave and Chrome, on Mac OS at least.

image

@bsclifton we should allow zero (or 1 if required for a technical minimum)

rebron commented 5 years ago

@simefield Do you have an example website or web page handy? If not, we'll go ahead and write a simple test case for it.

simefield commented 5 years ago

Here's an example: https://codepen.io/simefield/pen/YzKWgZG The space between the two grey border lines is 8 pixels in Chrome and other browsers, but observe this becomes 12 pixels in Brave because of the offending setting.

I also think my point is being missed. This setting should not exist at all. There should be no minimum default font size setting. At least, not one that affects the base REM size. For starters, having a minimum font size of 6 pixels is pointless, as—if anyone ever designed a site with 5px text—such poorly implemented text would still remain illegible at 6px regardless. Can anyone give me a use case where a setting of 6 pixels solves an issue? And if it solves nothing, but causes layout issues, surely we it should be removed from the browser's settings.

andr222 commented 5 years ago

I also think my point is being missed. This setting should not exist at all. There should be no minimum default font size setting. At least, not one that affects the base REM size. For starters, having a minimum font size of 6 pixels is pointless, as—if anyone ever designed a site with 5px text—such poorly implemented text would still remain illegible at 6px regardless. Can anyone give me a use case where a setting of 6 pixels solves an issue? And if it solves nothing, but causes layout issues, surely we it should be removed from the browser's settings.

If the choice is between readable and possible layout problems, the answer should be clear.
Some users can't read smaller type, so they need such a setting. Others would be happy with a 6 pixel minimum, which seems to be a reasonable default. (That is the default in some other browsers) If it isn't working properly, it needs to be fixed

yisibl commented 5 months ago

Chrome 118 started to tweak the minimum font size limit, see: https://chromestatus.com/feature/5150487577362432