Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Get more control over fitText.js when using CSS breakpoints.

branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.md

FitTextNow.js, for Conditional CSS breakpoints

Live demo: http://replete.github.com/FitTextNow/example.html

Updated:

getLayoutBreakpoint is better (IE6+), more rainbow, better demo, and rainbow. Also, there's rainbow.

How it works

It's just like FitText.js, except it doesn't handle the resize event for you, and has a reset trigger.

Why would I want to use this?

I modified fitText.js so that I could get more control over the window.resize event that it creates (added event namespace etc). I then realised for my own needs, it would make much more sense to strip out the event completely, and get finer control with CSS layout breakpoints.

What's a Conditional CSS breakpoint?

It's a breakpoint defined in CSS, I've used a technique based on http://adactio.com/journal/5429/ where we set a string name for the breakpoint within a media query, and then read it in Javascript, so certain script only runs within relevant breakpoints.

Something went wrong with that request. Please try again.