-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ensureMinFontSizeComputed
calculation if <body>
is a flex container
#18416
Fix ensureMinFontSizeComputed
calculation if <body>
is a flex container
#18416
Conversation
…tainer Given: ```css html, body { height: 100%; } body { display: flex; } ``` The `<div>` appended to the `<body>` will take up the full height of the viewport due to the implicit `align-items: stretch` of flex containers. This results in an incorrect computed `minFontSize` value.
fb5cf42
to
665fff0
Compare
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://54.241.84.105:8877/c41f81797120f25/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/c41f81797120f25/output.txt Total script time: 1.04 mins Published |
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://54.241.84.105:8877/2d6153d0b67d090/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://54.193.163.58:8877/da0d69ac89a229d/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/2d6153d0b67d090/output.txt Total script time: 29.68 mins
Image differences available at: http://54.241.84.105:8877/2d6153d0b67d090/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/da0d69ac89a229d/output.txt Total script time: 43.91 mins
Image differences available at: http://54.193.163.58:8877/da0d69ac89a229d/reftest-analyzer.html#web=eq.log |
Thank you for your contribution! |
Given:
The
<div>
appended to the<body>
will take up the full height of theviewport due to the implicit
align-items: stretch
of flex containers.This results in an incorrect computed
minFontSize
value.Reproduction
I isolated the calculation to demonstrate the issue:
https://codepen.io/razh/pen/OJePRMd/c9d3a97fb8c2f7df89f193808a3f3a02?editors=1111
This can also be reproduced at:
https://mozilla.github.io/pdf.js/web/viewer.html
By applying
display: flex
to the<body>
tag (opacity: 0
removed from.textLayer
for visibility):display: flex
display: flex