Git Product home page Git Product logo

8-point-grid's Introduction

8-point-grid

The 8 point scss grid system.

Installation

npm install 8-point-grid --save

Include scss in your build or use the compiled css file with the default settings.

Config

Customize variables to your liking.

  • $prefix whatever prefix you want, leave this empty if you want -classname
  • $size number of pixels you want your grid to be, ofc we use 8 ๐Ÿ‘Œ
  • $multiplier iterations of the size $size * $multiplier
  • $line line-height multiplier line-height: $size * $multiplier * $line

Usage

Class name structure .$prefix-prop-$multiplier

Avalible props

Margin

m  - margin
mt - margin-top
mr - margin-right
mb - margin-bottom
ml - margin-left
my - margin-top, margin-bottom
mx - margin-left, margin-right

Padding

p  - padding
pt - padding-top
pr - padding-right
pb - padding-bottom
pl - padding-left
py - padding-top, padding-bottom
px - padding-left, padding-right

Size

w - width
h - height
s - width, height

Type

fs - font-size
lh - line-height

Example

So if you want 8px margin-top, its: pg-mt-1

Or 64px font-size is: pg-fs-8

See all classes

Sketch

This repo also contains a Sketch file with an 8 point grid. Download Sketch file

To nudge a element in sketch 8px, go to Sketch -> Preferences and set move objects to 8 in the last input.

What is a 8 point grid?

8-point-grid's People

Contributors

sethne avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.