From 3224e4026e8022d8924c0e21729a1a02b14aa959 Mon Sep 17 00:00:00 2001 From: Arthur Verschaeve Date: Tue, 25 Nov 2014 20:09:45 +0100 Subject: [PATCH 1/4] Missing semicolons --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7c1e46c..d23119a 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ This will hopefully give you a level of "control" that might not be pixel perfec FitText now allows you to specify two optional pixel values: `minFontSize` and `maxFontSize`. Great for situations when you want to preserve hierarchy. ```javascript -jQuery("#responsive_headline").fitText(1.2, { minFontSize: '20px', maxFontSize: '40px' }) +jQuery("#responsive_headline").fitText(1.2, { minFontSize: '20px', maxFontSize: '40px' }); ``` ## CSS FAQ From 0e3ff6699f4a7781795af161e8e63d856e2f4b1e Mon Sep 17 00:00:00 2001 From: Dave Rupert Date: Tue, 3 Nov 2015 13:36:37 -0600 Subject: [PATCH 2/4] Added much needed things to the readme. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d23119a..3d0cefc 100644 --- a/README.md +++ b/README.md @@ -33,11 +33,13 @@ jQuery("#responsive_headline").fitText(1.2, { minFontSize: '20px', maxFontSize: ## CSS FAQ -- **Make sure your container has a width!** +- :warning: Run FitText before anything that hides the element you're trying to size (e.g. before Carousels, Scrollers, Accordions, Tabs, etc). Hiding an element's container removes its width. It can't resize without a width. +- :warning: **Make sure your container has a width!** - `display: inline` elements don't have a width. Use `display: block` OR `display: inline-block`+ a specified width (i.e. `width: 100%`). - `position:absolute` elements need a specified width as well. - Tweak until you like it. - Set a No-JS fallback font-size in your CSS. +- :new: If your text is full width, you might want to **NOT** use FitText and just use CSS `vw` units instead. Supported in all major browsers. ## Don't use jQuery? That's okay. Check out these handy non-jQuery versions maintained by other people. From a37bafbf0b66a8bf3f71475daf5dd09b9e7d2406 Mon Sep 17 00:00:00 2001 From: Dave Rupert Date: Tue, 12 Jan 2016 12:29:13 -0600 Subject: [PATCH 3/4] Adding links to other versions --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3d0cefc..cb08849 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,8 @@ That's okay. Check out these handy non-jQuery versions maintained by other peopl - [non-jQuery FitText](https://github.com/adactio/FitText.js) from @adactio - [Angular.js FitText.js](https://github.com/patrickmarabeas/AngularJS-FitText.js) from @patrickmarabeas +- [AMP-HTML FitText](https://github.com/ampproject/amphtml/tree/master/extensions/amp-fit-text) +- [FitText UMD](https://github.com/peacechen/FitText-UMD) by @peacechen ## Changelog * `v 1.2` - Added `onorientationchange` event From 26f5c3b52abff46cbab1d5e762f5f5999b178835 Mon Sep 17 00:00:00 2001 From: charles peters Date: Thu, 28 Jul 2016 12:04:49 -0700 Subject: [PATCH 4/4] renaming package --- bower.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index 44dfb61..c4887a3 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { - "name": "FitText.js", + "name": "jquery-fittext", "version": "1.2.0", - "main": "./jquery.fittext.js", + "main": "jquery.fittext.js", "dependencies": { "jquery": ">= 1.6" },