title: Why is this JS leaving out the fourth margin property?
body: <pre><code>var parallax = document.querySelectorAll(".slider-parallax"),
      speed = 0.5;
  
      window.onscroll = function(){
          [].slice.call(parallax).forEach(function(el,i){
          var windowYOffset = "-" + window.pageYOffset,
          elBackgrounPos = (windowYOffset * speed) + "px 0 0 0";
          el.style.margin = elBackgrounPos;
          });
      };
  </code></pre>
  
  <p>Expected behaviour is for the browser to render <code>margin: -0px 0 0 0</code> as inline-css. But the last value gets missed off everytime.</p>
  
  <p>If you change the above values to just <code>px 0</code>, so it applies to top and bottom, it works.</p>
  
  <p><a href="https://jsfiddle.net/vqdh4k0z/" rel="nofollow">https://jsfiddle.net/vqdh4k0z/</a></p>
  
  <p>Ideally, I only want to apply a negative value for margin-top. Is there an easier way of doing that?</p>