Skip to content
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

rem unit calculation does not vary for different base font sizes #3403

Open
bsweeney opened this issue Feb 26, 2024 · 0 comments
Open

rem unit calculation does not vary for different base font sizes #3403

bsweeney opened this issue Feb 26, 2024 · 0 comments
Milestone

Comments

@bsweeney
Copy link
Member

bsweeney commented Feb 26, 2024

When Dompdf performs rem calculations the calculated value does not appear to change with the font size applied to the root (HTML) element.

For example, changing the font size for the HTML element in the following document should adjust the size of the positioned DIV, but it does not.
 

<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <style>
    @page {
      size: 400 400;
    }
    html {
      font-size: 10pt;
    }
    #rem {
      background-color: orange;
      position: absolute;
      inset: 10rem;
    }
  </style>
</head>
<body>
  <div id="rem"></div>
</body>
</html>

Originally posted in #3402

@bsweeney bsweeney added this to the 3.0.1 milestone Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant