patrickmarabeas / ng-FitText.js

An AngularJS directive for inflating web type.
http://patrickmarabeas.github.io/ng-FitText.js
MIT License
222 stars 61 forks source link

Box-Sizing CSS3 support #18

Open haxxxton opened 9 years ago

haxxxton commented 9 years ago

Current calculation of font size appears to use (parent[0].offsetWidth - 6) as the detector of parent width. However, if the parent element has the following CSS applied:

-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;

Then the detected width fails to accommodate for any padding applied to the parent. (This is particularly noticeable when using Twitter Bootstrap with fittext elements directly inside col- items)

Current Hackaround for this is to wrap fittext elements in another div, however, out of the box support would be lovely :)

axelson commented 9 years ago

+1

ghost commented 9 years ago

+1

patrickmarabeas commented 9 years ago

I'll look to get a fix pushed in the next week.

makzumi commented 9 years ago

Any updates on this? thanks

willhoney7 commented 8 years ago

Did this every get implemented?