vue-slick icon indicating copy to clipboard operation
vue-slick copied to clipboard

Slide area not visible

Open Rahulgans opened this issue 7 years ago • 2 comments

`import slick from 'vue-slick';

export default { name: 'search-listing-component', components:{searchFilter,slick}, data(){ return { listingData:[], slickOptions:{ slidesToShow:2, horizontal:true, arrows:true } } },`

MY VIEW CODE. I am using Bootstrap 4.

<div class="col-12 col-lg-5 mt-md-5 pl-3 pr-2"> <div class="row"> <div class="col"> <slick ref="slick" :options="slickOptions"> <img class="img-fluid d-block col-6" src="@/assets/list1.png" /> <img class="img-fluid d-block col-6" src="@/assets/list1.png" /> </slick> </div> </div>

Nothing appears on the page. When I inspect on developer tools, I am able to see the classes concerned with slick

capture

Rahulgans avatar Feb 23 '18 02:02 Rahulgans

I had this same issue. The DOM was showing everything loaded but I couldn't see much

My issue was that I was importing the Slick styles into a scoped CSS block, therefore the CSS would not affect the Slick elements as they are in a different component

Moving the Slick CSS import to a global location fixed it for me

adamhughes86 avatar Oct 08 '18 17:10 adamhughes86

In order to target children with CSS selectors in a parent using Scoped CSS, you need to add the /deep/ selector to the beginning of your selector statement.

<style scoped>
  /deep/ .child {
    background-color: blue;
  }
</style>

CydGoblin avatar Jul 02 '19 20:07 CydGoblin