PurpleTurtleCreative / purple-turtle-creative

Custom theme for the Purple Turtle Creative WordPress website.
https://purpleturtlecreative.com/
GNU General Public License v3.0
0 stars 0 forks source link

Replace SlickJS with vanilla JS solution #42

Closed MichelleBlanchette closed 1 year ago

MichelleBlanchette commented 1 year ago

Main Goal: Get rid of jQuery for performance (and layout shift caused by SlickJS initialization)

Can I not just make a mostly-CSS solution of a container with flex-wrap: nowrap and overflow-x: hidden? Then barely any JavaScript is needed to scoot the scroll on button click, yes? (Or is that not possible with overflow: hidden???)

Infinite loop? Animated? Auto-play? Slide dot buttons? Dragging/swiping navigation?

MichelleBlanchette commented 1 year ago

Yeah, check out scroll snapping in CSS:

Seems legit!

MichelleBlanchette commented 1 year ago

Not really using the slider component anymore, so this is no longer needed. Very cool implementation possibility, though!