litedom icon indicating copy to clipboard operation
litedom copied to clipboard

css directive bug when use with normal css class

Open tanangular opened this issue 5 years ago • 0 comments

I found some bugs when use css directive with normal css class name. How to reproduce: i use parcel as bundler.

/* html */
  <style>
    body, html {
      font-family: 'Cascadia Code';
      margin: 0;
      padding: 0;
    }
    .box {
      padding: 10px;
      color: #fff;
      background-color: #88a343;
    }
    .redBG {
      background-color: red
    }
    .blueBG {
      background-color: blue;
    }
  </style>
</head>
<body>
  <div id="myContainer">
    <div>Counting {this.count}</div>
    <div :class="blueBG: this.count > 20" class="box">
      Will have .blueBG and .box if count is {this.count}.
    </div>
  </div>
  <script src="main.js"></script>
</body>
</html>

/* main.js */
import Litedom from 'litedom/dist/litedom.es'
Litedom({
  el: '#myContainer',
  // reactive data
  data: {
    count: 60,
  },
});
Screenshot 2562-10-03 at 00 09 45

It should be ...

xxx

tanangular avatar Oct 02 '19 17:10 tanangular