title: Vue inline conditional if?
body: <p>I have the following piece of code:</p>
  
  <pre><code>    &lt;div
          :id="'object' + object.id""
          :style="'position:absolute !important; width:' + object.width + '% !important; height:' + object.height + '% !important;'"&gt;
      &lt;div
  </code></pre>
  
  <p>This works fine and renders nicely as it should. </p>
  
  <p>I now want to add conditional stuff in there. Something like</p>
  
  <pre><code>if object.background == 'solid'
   background-color: #ffffff;
  endif
  </code></pre>
  
  <p>I tried achieving this via the Vue inline if, which gave me this:</p>
  
  <blockquote>
    <p>[object.background == 'solid' ? background-color: #ffffff important; :
    '']</p>
  </blockquote>
  
  <p>But that just gave a lot of errors, which lead me to think I'm tackling this all wrong.</p>
  
  <p>What would the correct approach be for me to achieve having short conditional statements in my style?</p>