[csswg-drafts] [cssom] [css-cascade] Legacy shorthands never appearing on cssText has unfortunate effects when variable references are involved.

emilio has just created a new issue for https://github.com/w3c/csswg-drafts:

== [cssom] [css-cascade] Legacy shorthands never appearing on cssText has unfortunate effects when variable references are involved. ==
https://drafts.csswg.org/css-cascade-4/#legacy-shorthand means that for:

```html
<div style="page-break-after: var(--a)"></div>
```

The following happens:

```js
div.style.cssText == "break-after:;"
```

It's a bit unfortunate, but maybe it's ok, given this is a more general issue (#2515), and these shorthands are supposed to be legacy anyway. We could fix legacy shorthands by special-casing them and saying that they serialize in this case, but that's not necessarily great, and certainly propagates the weirdness a bit more in the implementation.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3332 using your GitHub account

Received on Saturday, 17 November 2018 09:56:31 UTC