title: Vuejs - Use variable for background-image in style template
body: <p>I have got a question regarding using a variable within the background-image of the style template. Is this possible at all?</p>
  <p>I would like to achieve something like this:</p>
  <pre><code> &lt;script&gt;
    export default {
      name: 'setCss',
      computed: {
      cssVars() {
        var ua = navigator.userAgent.toLowerCase();
        var isAndroid = ua.indexOf(&quot;android&quot;) &gt; -1; //&amp;&amp; ua.indexOf(&quot;mobile&quot;);
        var path = '';
        if(isAndroid) {
          path = 'img/samsung/';
        } else{
          path = 'img/iphone/';
        }
        return {
          '--bg-path': path,
        }
      }
      }
    };
  &lt;/script&gt;
  </code></pre>
  <p>and then with this CSS:</p>
  <pre><code>    &lt;style scoped&gt;
  div {
      background-image: var(--bg-path) + '/1366x400@2x.jpg';
      background-size: 1366px 400px;
  }
  
  @media not all,
  not all,
  only screen and (max-width: 480px) {
      div {
          background-image: var(--bg-path) + '/480x288.jpg';
          background-size: 480px 288px;
      }
  }
  
  &lt;/style&gt;
  </code></pre>
  <p>This will not work but I am wondering if there is a way to do this?</p>