For example:
<xxx id="myid" ...></xxx>
If no code or nobody sets the inline css properties of element "xxx", then document.getElementById("myid").style.property always equals ""?
Do w3c standards or all browsers assure it?
On Blink based browsers, it seems to always set it to an empty string.
MDN recommends clearing them by setting them to null, which then isn't an empty string, but upon testing this in a blink based browser, it seems to reset to an empty string.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style
On some browsers, when a CSS property hasn't been set, it is literally undefined, which is quite different from null or "" (an empty string).
You can force some consistency between all browsers and updated values by coercing to an empty string.
document.getElementById("myid").style.property || ""
CSS is rapidly changing, with new properties appearing frequently. As such, it got me thinking, what happens in blink based browsers with unrecognised properties.
The answer is not consistent with known properties, and instead, they are undefined if not set. Equally these can be set to null.
I would recommend using falsy checks when appropriate to solve this problem.