title: CSS background shorthand, can't include size
body: <p>This works:</p>
  <pre><code>background: none center no-repeat
  background-size: contain
  </code></pre>
  <p>This does not work:</p>
  <pre><code>background: none center contain no-repeat
  </code></pre>
  <p>According to <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/background" rel="nofollow noreferrer">MDN</a>, the background shorthand property should be able to set the background-size as well as the other properties, but when I use it in this way (or with &quot;contain&quot; at other positions within the descriptor), Chrome ignores the entire background setting, and Dev Tools says &quot;Invalid property value&quot;.</p>
  <p>The workaround of simply putting the background-size as a separate property works, but it seems odd. What's the recommended way to define all these attributes?</p>
  <p>(My actual code has a background image URL, but the phenomenon exhibits just as much with &quot;none&quot;.)</p>
  <p>The formal grammar is extremely detailed, but I believe that my syntax is correct.</p>