vue-in-viewport-directive icon indicating copy to clipboard operation
vue-in-viewport-directive copied to clipboard

Class binding not working with CSS Modules

Open shawnolson-fp opened this issue 6 years ago • 1 comments

I have a div styled as such using CSS modules syntax ...

<div :class="$style.containerCTA" v-in-viewport></div>

Style looks like this ...

<style lang="stylus" scoped module>
.containerCTA {
    display: flex;
    align-items: center;
    max-width: 114rem;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: translate3d(0, 5px, 0);
    transition: opacity 0.2s, transform 0.3s;

    &.in-viewport {
      opacity: 1;
      transform: none;
    }
  }
  </style>

screen shot 2018-12-11 at 6 46 56 am

But it never actually does anything because the class isn't native... any suggestions?

shawnolson-fp avatar Dec 11 '18 13:12 shawnolson-fp

Sorry, not really. We don't use css modules so I haven't run up against this.

weotch avatar Dec 11 '18 15:12 weotch