Giter VIP home page Giter VIP logo

baseline's Introduction

Using Baseliner

Bookmarklet

Add this bookmarklet to use Baseliner on any webpage.

Super-short Example

<script src="baseliner.js"></script>
<script>
window.onload = function() {
    baseliner = new Baseliner(8);
}
</script>

This will add the Baseliner widget to your page:

Show Baseline

If you click on Show Baseline an 8px baseline grid overlay is displayed:

Hide Baseline

You can customize the size of the grid too:

16px Baseline

Configuration Options

Two configuration options are supported:

  • gridColor โ€” an RBGA array ([255, 0, 0, 255] for red) or a color string (red, blue, green or grey/gray). If this option is not set, it defaults to a highly transparent red.
  • gridHeight โ€” the height of the baseline grid. If it is not set, it defaults to 10 pixels.

Some more examples

// a black grid, 20 pixels high
baseliner = new Baseliner({'gridColor': [0, 0, 0, 255], 'gridHeight': 20 });
// a red grid, 10 pixels high
baseliner = new Baseliner({'gridColor': 'red'});
// a very faint grey grid, 8 pixels high

baseline's People

Contributors

jkeyes avatar

Stargazers

Mahesh Babu.R avatar

Watchers

Mahesh Babu.R 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.