Giter Site home page Giter Site logo

baseline's Introduction

#Baseline

Baseline is a simple development tool that helps establish vertical rhythm in web app/site pages. Baseline inserts a canvas element in to the page, then draws line rules according to a base line-height set by the developer. With these guides in place, font-size, line-height, margin, and padding settings can be visually spot-checked to help ensure a consistent vertical rhythm.

##Usage

  1. Place the baseline.js script reference immediately before the document's closing body tag.
  2. Apply a new class to the body element in the form of "baseline-[lineheight]" - so for example, <body class="baseline-24"> to draw line rules for a 24 pixel baseline.

With the script in place and the class attached to the body tag, the line rules will be drawn the next time the document is loaded. As the canvas element is given a z-index of 7000 so that it sits on top of any page content, a toggle button is also written to the page. Use this to hide the canvas if you need to access elements beneath it.

baseline's People

Stargazers

Alec Perkins avatar

Watchers

Alec Perkins 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.