Skip to content

v4.3.0 - Breakpoint options

Choose a tag to compare

@davidjerleke davidjerleke released this 21 Mar 21:28

🌟 New Features

Solves issue #156. With this release, it's possible to declare different options for different breakpoints. It's achieved by using the content attribute of the pseudo element :before on the root node:

.embla:before {
  display: none;
  content: '{
    "slidesToScroll": 1,
    "draggable": true
  }';
}
@media (min-width: 768px) {
  .embla:before {
    content: '{
      "slidesToScroll": 2,
      "draggable": false
    }';
  }
}

Enjoy!