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

For anyone else that comes upon this, I figured I would clarify...

If creating the custom property in this way
```
CSS.registerProperty({
  name: '--var',
  syntax: '<length>',
  inherits: false,
  initialValue: '0px'
});
```
Then using
```
el.style.setProperty('--var','calc(50vh + 4em)');
window.getComputedStyle(el).getPropertyValue('--var')
```
Will in fact give you a resolved value like `380px` and not `calc(50vh + 4em)`

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

Received on Sunday, 25 February 2018 20:54:45 UTC