I feel like I shouldn't have to ask this question, but it has me perplexed. Previously I've never really been bothered about exact pixel sizes of rendered HTML items, but I am working with a designer who is comparing the browsers output (Chrome) with the design in Figma.
The case that has me perplexed is buttons, why when I add a button to my html page and give it a specific pixel height does it not render to this height when measured with the Powertoys ruler?
For example a blank jsfiddle with
<div>
<button style="height: 48px;">
Do something magic
</button>
</div>
will render:
now I appreciate default borders, paddings, etc. However:
42+2+1+1+2=48 so how come the measurement is 70px ?
In case it matters
136.0.7103.93 (Official Build) (64-bit) (cohort: Stable)
Windows 11 Version 24H2 (Build 26100.3775)





