Re: [css-shapes][css-values] getComputedStyle for Percentages used as length

On Mon, Sep 16, 2013 at 1:24 PM, François REMY
<francois.remy.dev@outlook.com> wrote:
> After some discussion with Tab, it appears that getComputedStyle does not return the used style anymore, but some intermediate concept called the resolved style:
>
> # http://dev.w3.org/csswg/cssom/#resolved-values

It never returned the used style, and no CSS spec every claimed that.
This is not a recent change; it's always been this way since the
function was introduced.

gGS returns what CSS2 (not 2.1) called "computed style", but we now
call "used style" - 2.1 separated "computed" into today's computed
style and used style concepts.  For the handful of CSS2 properties
where it mattered, gCS still returns the used style.  For all new
properties, it returns the computed style, to keep the name halfway
sensical.

(Exception: for compat reasons, grid-definition-rows/columns returns
used style.)

> However, all documentation I can find actually says it returns the final used value:
>
> # https://developer.mozilla.org/en-US/docs/Web/API/window.getComputedStyle
> # http://docs.webplatform.org/wiki/css/cssom/methods/getComputedStyle
> # http://msdn.microsoft.com/en-us/library/ie/ff975168%28v=vs.85%29.aspx
> #
> # The returned object actually represents the CSS 2.1 used values, not the computed values.
>
> We should probably update those docs. I volunteer for doing the change, is it alright or is it premature?

Fix all of them, please; they've been wrong for a decade.

~TJ

Received on Monday, 16 September 2013 20:33:36 UTC