Skip to content

Instantly share code, notes, and snippets.

@donabrams
Created July 28, 2012 21:33
Show Gist options
  • Select an option

  • Save donabrams/3194893 to your computer and use it in GitHub Desktop.

Select an option

Save donabrams/3194893 to your computer and use it in GitHub Desktop.
Change em-based size by adjusting font-size
# reflexive layout based on em's
(($el, scale) ->
win = $(window)
# simplified version of fittext.js
resize = ->
$el.css 'font-size', win.width()/scale
resize()
win.on 'resize', resize
) $("body"), 80.0
@donabrams
Copy link
Copy Markdown
Author

Zoom doesn't work in chrome with this script though. Not sure why not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment