Re: [csswg-drafts] [cssom] Serialization of CSS declaration block returned from getComputedStyle

> Every element has value for every property, so it has to be listing all of them.

A computed style needs to be able to retrieve a value for each property (for example with ```getPropertyValue()```), but it is unclear that the gCS serialization _must_ include all of them.

We are discussing about what the serialization should be, and now leaping from "the empty string" to "it has to be listing all of them".

> That is very different from what computed value means to be.

```getLength()``` on a computed style becomes totally meaningless if you do not define it that way.

The basic idea is: if you need the computed value for a given property, use ```getPropertyValue()``` (I also provide ```getPropertyCSSValue()```). But my gCS serialization behaves as described previously, and IMHO is very meaningful (and far better than the empty string).

-- 
GitHub Notification of comment by carlosame
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1033#issuecomment-386230126 using your GitHub account

Received on Thursday, 3 May 2018 08:52:18 UTC