npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@fishtank/grid

v3.0.1

Published

Fishtank Grid

Downloads

39

Readme

Fishtank Grid

Installation

npm install @fishtank/grid

Dev Environment Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

Grid Build and Test

# lint SCSS
npm run test

# build uncompressed grid 
npm run build:css

# build grid for production with minification
npm run build

Usage

The Fishtank grid comes in 2 versions, flexbox and css display:grid. Flexbox has wider adoption, and is a safe choice for projects that require wider browser compatibility. As of June 2018, The display:grid version has fairly high adoption with modern browers, but is not recommended for projects that need to support IE10 and earlier or Chrome 57 and earlier. Please consult caniuse.com to check adoption.

Container

The "ft-container" class sets the main container width, across responsive breakpoints. These are fixed widths with minimum breakpoints at 1440px, 1008px, and 752px (desktop down to tablet vertical sizes). Below 752px the grid becomes fluid, and is set the max width of the vuewport size.

<div class="ft-container">

By adding the "ft-fluid" class to same element, the container becomes fluid through all breakpoints

<div class="ft-container ft-fluid">

Flexbox Grid

The Flexbox grid provides a 12 column layout to provive layout and alignment of content. Add "ft-row-flex" to start your flexbox row container. Use the notation of "ft-col-[breakpoint size][number of columns] to define the number of colums of the cell occupies.

<div class="ft-container">
  <div class="ft-row-flex">
    <div class="ft-col-xs6"></div>
  </div>
</div>

Display:Grid

CSS Display:grid offers the opportunity to use a grid system designed natively for the browser. However, to support the overall Fishtank grid and spacing guidelines, we have implement a series of utility class names for row and column alignments up to a 12 column grid.

Add "row-dgrid" to start your display:grid row container. Add the "ft-col-fixed-[Number of columns]" class name to element to define the number of columns displayed per row. Display:grid will automatically display the cells at the correct % width to display that number of cells per row. It will continue to flow the cells into multiple rows, maintaining the same cell width.

<div class="ft-row-dgrid ft-col-fixed-4"></div>

The responsive column pattern functions similarly to the flexbox grid.

<div class="ft-row-dgrid">
  <div class="ft-col-xs12 ft-col-sm6 ft-col-md8 ft-col-lg3"></div>
  <div class="ft-col-xs12 ft-col-sm6 ft-col-md4 ft-col-lg9"></div>
</div>

There are also offset utility classes.

<div class="ft-row-dgrid">
  <div class="ft-col-offset-start-xs2 ft-col-offset-end-xs5"></div>
  <div class="ft-col-offset-start-xs9 ft-col-offset-end-xs13"></div>
</div>

[TODO: Flexbox alignment and order class names; Display:grid template layouts]