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

grid-style

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grid-style

Grid layout implemented by flex box.

  • 0.2.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14
increased by366.67%
Maintainers
1
Weekly downloads
 
Created
Source

grid-style npm

CSS grid layout which is based on 12 preset columns layout implemented by flex box.

👉Browse online

Installing

# npm
npm i gird-style --save

# yarn
yarn add grid-style
<!-- CDN-->
<link rel="stylesheet" href="https://unpkg.com/grid-style@latest/dist/index.min.css">
<!-- or -->

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/grid-style@latest/dist/index.min.css">
<!-- recommend you to add version number to url ending. eg.https://unpkg.com/grid-style@x.y.z --> 

Usage

// import css file to js file
import 'grid-style/dist/index.min.css'
// or
import 'grid-style/dist/index.css'

// a sass alternative to css file
import 'grid-style/layout/index.sass'
/* import css file to your own css file */
@import 'grid-style';

/* or */

/* import sass file to your own sass file */
@import 'grid-style/layout/index.sass'

Basis

Selectordescription
.girdflex box container
.grid.no-wrapdisallowed wrap flex item
.gird.colcolumn direction
.gird.rowrow direction
.gird-celldefine default flex grow factor value of a flex item
.grid.grid-cell-1 ~ 12define single flex item width (based on 1/12 container width

alignment

Selectordescription
.grid-topdefine alignment per row to top-aligned
.grid-centerdefine alignment per row to vertically-centered
.grid-bottomdefine alignment per row to bottom-aligned
.grid-cell-topdefine alignment per item to top-aligned
.grid-cell-centerdefine alignment per item to vertically-centered
.grid-cell-bottomdefine alignment per item to bottom-aligned

gutters

Selectordescription
.grid[grid-gutters="1 ~ 5"]define flex item gutter (based on .5em

offset

Selectordescription
.grid.offset-'1 ~ 12'define flex item offset (based on 1/12 container width

responsive

Notice: This section define properties to all flex item (.grid-cell * n) from one flex container(.grid * 1).

Selectordescription
.grid-full ~ 2, 3, 4 > .grid-celldefine all flex item width from same flex container
.small-grid-fit, full, 2, 3, 4 > .grid-cellsame as .grid-full ~ 2, 3, 4 > .grid-cell, but it only works on device which width over 576px
.large-grid-fit, full, 2, 3, 4 > .grid-cellsame as .grid-full ~ 2, 3, 4 > .grid-cell, but it only works on device which width over 768px

Keywords

FAQs

Package last updated on 30 Jul 2018

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