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

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

From: Philip Rogers <pdr@chromium.org>
Date: Mon, 11 Jan 2016 12:11:51 -0800
Message-ID: <CAJgFLLuebkwjdJEiWsUsyF-nVCLVMD5VVeP9BzawqixkgOYQew@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: www-style <www-style@w3.org>

It's true that returning the used font-size from getComputedStyle would
likely require layout/reflow. I believe text-size-adjust is the only thing
that affects the used font-size though, so font-size would only need to
cause a layout/reflow on pages with text size adjustment enabled (credit to
dbaron for this idea). Do you think that would work?

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

On Sat, Jan 9, 2016 at 7:15 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 1/9/16 6:46 PM, Philip Rogers wrote:
>> To address these usecases I'd like to propose two changes that expose
>> the text size adjustment values:
>> 1) Spec getComputedStyle(...)["font-size"] to return the used font size
>> after adjustment.
> Does this preserve the general invariant that doing:
>   foo.style.fontSize = getComputedStyle(foo).fontSize;
> is a no-op?  It doesn't seem like it would, and that's why Gecko has the
> behavior it has here....
> -Boris
Received on Monday, 11 January 2016 20:12:39 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:59 UTC