Fix ensureMinFontSizeComputed calculation if <body> is a flex container
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.
This commit is contained in:
parent
7ffea2f02a
commit
665fff020e
@ -480,6 +480,7 @@ class TextLayer {
|
|||||||
div.style.opacity = 0;
|
div.style.opacity = 0;
|
||||||
div.style.lineHeight = 1;
|
div.style.lineHeight = 1;
|
||||||
div.style.fontSize = "1px";
|
div.style.fontSize = "1px";
|
||||||
|
div.style.position = "absolute";
|
||||||
div.textContent = "X";
|
div.textContent = "X";
|
||||||
document.body.append(div);
|
document.body.append(div);
|
||||||
// In `display:block` elements contain a single line of text,
|
// In `display:block` elements contain a single line of text,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user