Comments (5)
You can do this with <= v2.4.0
<div data-fittext>
<span>These lines</span>
<span>will all be the same</span>
<span>font size</span>
</div>
Can't remember if a line break works as well...
I'll have to see if I can get this working again in v3.0.0 + when I get some time.
from ng-fittext.js.
Running into a similar problem. Would be nice if you could configure the directive's link function’s hard-coded styles to maybe help this out (the element[0].style.whiteSpace = 'nowrap';
stuff.)
Awesome plugin, btw.
from ng-fittext.js.
Aye, I didn't think about multi-line when including those styles.
from ng-fittext.js.
Line breaks now work in v3.2.0 with min font size specifications, see demo (type in input): http://patrickmarabeas.github.io/ng-FitText.js/ but isn't something you can specify as to where it occurs.
To be able to specify we need to divide the ratio by the number of line breaks. Are you simply using <br>
's? The other option would be to look for data attributes which could be specified on any element...
<span data-fittext>
<span data-fittext-sub>Line 1</span>
<span data-fittext-sub>Line 2 that's longer</span>
</span>
Let me know what you think...
from ng-fittext.js.
v3.3.0 adds data-fittext-nl
attribute. Wrap each new line in a span/wrapper of some sort and include the attribute. See demo page for example: http://patrickmarabeas.github.io/ng-FitText.js/
from ng-fittext.js.
Related Issues (20)
- dynamically call ng-fitText HOT 9
- Improved handling of custom fonts
- Cache element var
- Force refreshing HOT 7
- The behavior of Jade may prevent this module to work out of the box HOT 4
- The behavior of Jade can make complicated integration HOT 1
- Provide new version on npm HOT 3
- Cropping on last character HOT 1
- Resizing of dynamic text - does not work when data changes constantly HOT 4
- Parent padding should be excluded HOT 3
- Not working on page load. Only when resizing page. HOT 1
- Adding negative pixel letter-spacing causes fitText not to work as expected HOT 1
- Method to reset FitText HOT 1
- Provide source in bower HOT 2
- Solution for ng2 (Angular2)? HOT 3
- Line height issue HOT 6
- FitText makes the $digest cycle repeat a lot of times, and transition time becomes really long HOT 5
- Disable line-height HOT 2
- Line height calculating incorrectly
- Update minified js
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ng-fittext.js.