@andban/snapgrid-css

A CSS library for building responsive containers using scroll snap

Usage no npm install needed!

<script type="module">
  import andbanSnapgridCss from 'https://cdn.skypack.dev/@andban/snapgrid-css';
</script>

README

snapgrid-css

Installation

$ npm i @andban/snapgrid-css
# or yarn
$ yarn add @andban/snapgrid-css

Classes

.sg-hfill[-(xs|sm|md|lg|xl)]

Creates a container that will collapse when the screen size falls below the break point and enables horizontal scrolling.

.sg-vfill[-(xs|sm|md|lg|xl)]

Creates a container that will collapse when the screen size falls below the break point and enables vertical scrolling.

.sg-snap

A container that will expand when the container reaches its breaking point.