This seems to only happen when I use “background” in the parameters of getPropertyValue();:
var d = document.getElementById('myDiv');
window.getComputedStyle(d).getPropertyValue('background'); // ""
Why does it return an empty string and how can I get this to return the actual background css property?
According to this page, at least the mozilla browser returns
nullwhen requesting the value of shorthand properties. So it seems have to query the different properties of the background style separately:Edit: it looks like it is a known bug