getComputedStyle returns incorrect font-size when set to "unset" or "inherit"

Fixed, flighted Issue #9748455

Details

Author
T.J. C.
Created
Nov 10, 2016
Privacy
This issue is public.
Fixed in build #
15002
Reports
Reported by 3 people

Sign in to watch or report this issue.

Steps to reproduce

https://jsfiddle.net/njq77mj6](https://jsfiddle.net/njq77mj6)[https://jsfiddle.net/njq77mj6](https://jsfiddle.net/njq77mj6)

 

Also see:

http://stackoverflow.com/questions/40528089/why-does-cssfontsize-produce-different-results-in-edge](http://stackoverflow.com/questions/40528089/why-does-cssfontsize-produce-different-results-in-edge)[http://stackoverflow.com/questions/40528089/why-does-cssfontsize-produce-different-results-in-edge](http://stackoverflow.com/questions/40528089/why-does-cssfontsize-produce-different-results-in-edge)

 

Markup:
<span style="font-size: 30px;"><input/></span>

<style>
span input {
font-size: inherit;
}
input {
font-size: 15px;
}
</style>

Gives “15px” instead of “30px” for the fontSize of the input from both getComputedStyle and currentStyle. Chrome and Firefox report 30px as expected.

The input is rendered correctly (with a 30px font size), it’s just the information from the method/property that’s incorrect.

Attachments

0 attachments

    Comments and activity

    • Apologies: I’ve replicated it in IE11. The person posting the original question on Stack Overflow said they’d replicated it on both IE and Edge.

    • Microsoft Edge Team

      Changed Assigned To to “Brad E.”

      Changed Title from “getComputedStyle and currentStyle return incorret values when inherit is involved” to “getComputedStyle returns incorrect font-size when set to "unset" or "inherit"”

      Changed Assigned To from “Brad E.” to “Saqib A.”

      Changed Status to “Confirmed”

      Changed Steps to Reproduce

      Changed Status from “Confirmed” to “Fixed, not yet flighted”

      Changed Status from “Fixed, not yet flighted” to “Fixed, flighted”

    • Hello,

      Thank you for providing this information about the issue. We are pleased to report this feature is fixed in Edge 15063 and is available in our latest Insider Preview build.

      Best Wishes,

      The MS Edge Team

    You need to sign in to your Microsoft account to add a comment.

    Sign in