From fa97f2c3699a14d7914ee599ccef67bd6f3f918d Mon Sep 17 00:00:00 2001 From: Daniel Stock Date: Fri, 2 Oct 2026 17:08:57 +0200 Subject: [PATCH] Change html structure to get get rid of id's --- README.md | 71 +++++++++++++++++--- index.html | 176 +++++++++++++++++++++++-------------------------- src/snappy.css | 74 ++++++++++++--------- src/snappy.js | 56 ++++++++-------- 4 files changed, 215 insertions(+), 162 deletions(-) diff --git a/README.md b/README.md index 4def07a..b9947cb 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,11 @@ Snappy is yet another carousel library. Its goal is to be as lightweight and performant as possible. + It does not implement every feature found in other carousel libraries. Instead, it relies on native CSS scroll snapping and adds as little on top as possible. -Mouse-drag behavior closely follows native touch scrolling in the browser, including inertia and snapping to a slide. +Mouse-drag behavior closely follows native touch scrolling in the browser, including inertia and snapping to a slide. Thus dragging with the mouse feels pretty identical to native scrolling on a touch device or using a trackpad. + | File | Size | | ---------- | ------: | @@ -14,7 +16,8 @@ Mouse-drag behavior closely follows native touch scrolling in the browser, inclu ## Usage -### CSS only + +### CSS only for a basic scroll container You can use Snappy without JavaScript. This gives you a simple CSS-only scroll container with snapping slides. @@ -23,17 +26,55 @@ You can use Snappy without JavaScript. This gives you a simple CSS-only scroll c -