W3C home > Mailing lists > Public > www-style@w3.org > January 2016

Re: [css-size-adjust] Expose the adjusted font-size and adjustment percentage

From: Boris Zbarsky <bzbarsky@mit.edu>
Date: Mon, 11 Jan 2016 15:25:11 -0500
To: Philip Rogers <pdr@chromium.org>
Cc: www-style <www-style@w3.org>
Message-ID: <56940FA7.9010209@mit.edu>
On 1/11/16 3:11 PM, Philip Rogers wrote:
> It's true that returning the used font-size from getComputedStyle would
> likely require layout/reflow.

That wasn't my concern.  Plenty of things in getComputedStyle need 
relayout to calculate.

> Are you primarily concerned with the performance impact, or is there
> also a correctness issue with getComputedStyle(...).fontSize not being a
> no-op?

It's a correctness issue, imo.  Generally, the value returned by 
getComputedStyle should be such that setting it as the specified value 
doesn't change the way things look/act.  Computed and used values both 
typically have that property, actually.

 From that point of view, if a UA is enforcing a minimal used font size, 
returning that used font size from getComputedStyle seems fine.  But if 
a UA is multiplying all font sizes by some constant factor to go from 
computed to used, then returning the used value from getComputedStyle 
would mean that every time you do the "set specified style to result of 
getComputedStyle" operation you would pick up another factor of that 
constant, right?

Are we in that sort of situation here, or am I misunderstanding the 

Received on Monday, 11 January 2016 20:25:40 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:56 UTC