Change the behavior of minimum font size on rem

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
zcyzcy88

Change the behavior of minimum font size on rem

Unread post by zcyzcy88 » 2017-06-08, 14:37

Inherited from Issue #1153

Please seriously consider again, don't hurry to lock this thread.
This behavior, set root as 10px, is common, not corner case.

Demo: https://codepen.io/anon/pen/eRpxNW

"minimum font size" should apply to computed value, not used value.

For example, if the root is 10px, and then there is text specified as 1.1, 1.2, 1.3 ..2rem, and I've set "minimum font size" as 15px,
Then I would expect the page to be rendered as:
- Google Chrome version: 15, 15, 15, 15, 15, 16, 17, 18, 19, 20px (this is as my expect)
- Pale Moon version: 16.5, 18, 19.5 ..30px

I believe Google Chrome version is more fit common sense, although break the definition (related to root | proportional to root).
Pale Moon version keeps "by definition, the way rem works", but cause page seen too big.
Off-topic:
Don't teach me when to use page zoom or minimum font size,
We, are here, are at least power users.

If everything is too small, I use page zoom as the obvious approach.
I use minimum font size, to ensure small font won't be too small, while not need to proportional zoom other things.
Off
Off
Chrome on
Chrome on
Pale Moon on
Pale Moon on

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35477
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Change the behavior of minimum font size on rem

Unread post by Moonchild » 2017-06-08, 16:15

The way it is implemented right now is correct. it has nothing to do with semantics, and everything to do with the following corner case:
  • A website uses rem in a way that it was not meant for, and
  • A user forces a minimum base font size (a "wallpapering" accessibility setting) instead of using page zoom to enlarge text
Our implementation adheres to the base font size on the root element and scales everything relatively to that. That is, by definition, the way rem works. It is the very definition of that CSS unit. If you don't want that to happen, then you shouldn't be using rem in your web design, to begin with, and you shouldn't be enforcing a minimum font size that everything else is proportional to. Responsive design can also be done a lot better than using rem as if it was a magic wand (the lazy way out).

Ergo: the accessibility problem is on the side of the website, not the browser. If you run into such sites and you MUST use the minimum base font size setting for your workflow, then you should let the webmasters know about this corner case. There's a good reason why all sites with this issue have been quick to respond to fix their oversight when they were contacted by users/Mozilla.

Doing it "the Chrome way" causes disjointed scaling of web content. It will break page design when page zoom is used, as a result, because small fonts are forced to be the minimum size and will overflow their layout space.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
adesh
Board Warrior
Board Warrior
Posts: 1277
Joined: 2017-06-06, 07:38

Re: Change the behavior of minimum font size on rem

Unread post by adesh » 2017-06-08, 16:21

I totally agree with Moonchild, and you seem to agree too when you say "Chrome breaks definition". A lot of web compatibility issues arise just like that, when one browser follows standards and some don't. It will just create more problems for web developers.

Going the Chrome way would be supporting the wrong usage of "rem", not the indented one. And by principle Pale Moon does not (cannot) go against web standards/spec.
Off-topic:
EDIT:- Spent too much time in editor, Moonchild is fast.

zcyzcy88

Re: Change the behavior of minimum font size on rem

Unread post by zcyzcy88 » 2017-06-08, 19:48

There are spec for "rem unit" but no spec for "minimum font size".

Then become another question:
Consider "apply minimum font size" as computing process or individual process?

If "computing process", Chrome version breaks rem definition.


Pale Moon version:
1- declare
2- compute and apply minimum font size in computation
3- compute based on computed root and apply minimum font size in computation
4- render

Chrome version:
1- declare
2- compute
3- compute based on computed root
4- apply minimum font size (individual)
5- render

Off-topic:
And, Pale Moon is pretty good execute the spec its declared. (seriously praise, not sarcasm)
Case: https://codepen.io/anon/pen/MoKggj
Mirror case, root is big and rem is fractional
Mirror case, root is big and rem is fractional

Locked