Skip to content


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

Failed to load latest commit information.

FitTextNow.js, for Conditional CSS breakpoints

Live demo:


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