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

Validate relation to font-size #19

Open
HrFlorianHoffmann opened this issue Sep 18, 2019 · 0 comments
Open

Validate relation to font-size #19

HrFlorianHoffmann opened this issue Sep 18, 2019 · 0 comments

Comments

@HrFlorianHoffmann
Copy link

Could you validate that you consider the font size correctly? Plus maybe add a thought on "px" vs. "pt" vs. "em"? For example: "Provide the font size in pixels. Other units like pt, em, and rem are not supported".

Your size calculator creates a <span> element with a font-size: 100; CSS property. However, the number 100 without a unit of measure seems to be no acceptable value for the font-size property. Correct would be to provide it as 100px.

Providing the font size without unit will make the calculated size depend on a lot of things, such as surrounding HTML elements etc. In your calculator's page, ultimately the defaults hard-coded into the browser the page runs in, will apply. According to the StackOverflow response linked above, this will usually be something smaller than 100px.

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