Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jamieomaguire/gridify

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jamieomaguire/gridify

A utility-first CSS Grid library

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Gridify

A utility-first CSS Grid library. Inspired by larger open source libraries.

Requirements

dart-sass

Config

Create the following configuration variables (SCSS) before importing the grid CSS: (Values below are just examples)

$grid-gap-base: 1rem;
$min-screen-size-sm: 300px;
$min-screen-size-md: 600px;
$min-screen-size-lg: 1000px;
$min-screen-size-xl: 1400px;

$max-gap-variants: 10;
$max-columns: 12;
$max-rows: 12;

Usage

Simply import gridify.scss into your application's styling!

<h1>6 Column Grid (Responsive)</h1>

<section class="gfy-grid gfy-grid-gap:2 gfy-grid-cols:6">
  <div class="gfy-col-span:6 gfy-col-span:sm:4 gfy-col-span:md:3 gfy-col-span:lg:5 gfy-col-span:xl:2">1</div>
  <div class="gfy-col-span:3 gfy-col-span:sm:2 gfy-col-span:md:3 gfy-col-span:lg:1 gfy-col-span:xl:4">2</div>
  <div class="gfy-col-span:3 gfy-col-span:sm:2 gfy-col-span:md:3 gfy-col-span:lg:4 gfy-col-span:xl:2">3</div>
  <div class="gfy-col-span:6 gfy-col-span:sm:4 gfy-col-span:md:3 gfy-col-span:lg:2 gfy-col-span:xl:4">4</div>
</section>
<h1>Row Spanning Grid</h1>
<section class="gfy-grid gfy-grid-gap:1 gfy-grid-rows:3 gfy-grid-flow:col">
  <div class="gfy-row-span:3">1</div>
  <div class="gfy-row-span:1 gfy-col-span:2">2</div>
  <div class="gfy-row-span:2 gfy-col-span:2">3</div>
</section>
<h1>Dynamic Column Grid (Responsive)</h1>
<section class="gfy-grid gfy-grid-gap:1 gfy-grid-cols:1 gfy-grid-cols:sm:2 gfy-grid-cols:md:3 gfy-grid-cols:lg:4 gfy-grid-cols:xl:6">
  <div>1</div>
  <div>2</div>
  <div>3</div>
  <div>4</div>
  <div>5</div>
  <div>6</div>
  <div>7</div>
  <div>8</div>
</section>

All Gridify classes are prepended with gfy- to help prevent class name conflicts.

FAQs

Package last updated on 22 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc