Git Product home page Git Product logo

ashlar.js's Introduction

ashlar.js

A flexible jQuery plugin for generating horizontal and vertical baseline grids. Super-duper lightweight at 0.8kb.

Basic demo

Usage

At it's simplest ashlar.js can be used on any selector which you want to add horizontal or vertical guides to:

jQuery('#wrapper').ashlar();

Though you'll probably want to change the dimensions to fit with your own design. All the options are passed in the standard way:

jQuery('#wrapper').ashlar({
  baseline: 21,
  cols: 16
})

Options

baseline

Type: Float Default: 24

Space between vertical lines, typically the base font size multiplied by the line height e.g. 16 * 1.5 = 24

baselineColour

Type: String Default: #ddd

Colour of the vertical grid; can be provided as a hex, color, rgb or rgba value

cols

Type: Integer Default: 12

Number of horizontal columns

colColour

Type: String Default: #eee

Colour of the horizontal grid; can be provided as a hex, color, rgb or rgba value

gutter

Type: Integer Default: 20

Space between columns in pixels

horizontal

Type: Boolean Default: true

Show the horizontal grid

vertical

Type: Boolean Default: true

Show the vertical grid

Browser Support

  • Internet Explorer 8.0+
  • Firefox 3.0+
  • Safari 4.0+
  • Chrome 14.0+
  • Opera 10.0+

ashlar.js's People

Contributors

mxkxf avatar

Stargazers

Oscar avatar Jonno Riekwel avatar Aaron U. Salmon avatar Nick Lapitsky avatar Purwa Astawa avatar Jacob McDonald avatar Daryn St. Pierre 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.