Skip to content

Validate relation to font-size #19

@HrFlorianHoffmann

Description

@HrFlorianHoffmann

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions