Re: [csswg-drafts] [cssom] getComputedStyle()[--var] return a resolved value?

But the value of `--var: calc(50vh + 4em)` is only interpreted as a sequence of tokens, it never resolves to a length!

In fact CSS alone can't know that you want to resolve that custom property to a length and not to something else. But the [registerProperty]( Houdini API could be used for that.

Another approach is setting the expression that you want to resolve as a length to some standard property which computes to a length, e.g.

```js = "calc(50vh + 4em)";
getComputedStyle(el).marginLeft; // 380px = "";

GitHub Notification of comment by Loirooriol
Please view or discuss this issue at using your GitHub account

Received on Saturday, 24 February 2018 23:30:39 UTC