diff --git a/src/blocks/blocks/slider/style.scss b/src/blocks/blocks/slider/style.scss index b442b6f3a..7bf0b6722 100644 --- a/src/blocks/blocks/slider/style.scss +++ b/src/blocks/blocks/slider/style.scss @@ -12,13 +12,14 @@ --width: auto; width: var( --width ); + display: grid; .glide__track { border: var( --border-width ) solid var( --border-color ); border-radius: var( --border-radius ); overflow: hidden; } - + .glide__slides { height: var( --height ); animation: load 4s 3; diff --git a/src/blocks/frontend/slider/index.js b/src/blocks/frontend/slider/index.js index f77c55b75..868c5f00f 100644 --- a/src/blocks/frontend/slider/index.js +++ b/src/blocks/frontend/slider/index.js @@ -35,7 +35,7 @@ const init = () => { slider.appendChild( el.firstElementChild ); } - new window.Glide( `#${ slider.id }`, { + new window.Glide( slider, { ...slider.dataset, type: 'carousel', keyboard: true,