Aaron Newton 24d5678171 HUE-47 há 15 anos atrás
..
Assets ae333e405b hue (formerly Cloudera Desktop) from internal commit 4694ac0434dad85170854c5378a389585d87f679 há 15 anos atrás
Demos ae333e405b hue (formerly Cloudera Desktop) from internal commit 4694ac0434dad85170854c5378a389585d87f679 há 15 anos atrás
Docs ae333e405b hue (formerly Cloudera Desktop) from internal commit 4694ac0434dad85170854c5378a389585d87f679 há 15 anos atrás
Source 24d5678171 HUE-47 há 15 anos atrás
README.md ae333e405b hue (formerly Cloudera Desktop) from internal commit 4694ac0434dad85170854c5378a389585d87f679 há 15 anos atrás
package.yml ae333e405b hue (formerly Cloudera Desktop) from internal commit 4694ac0434dad85170854c5378a389585d87f679 há 15 anos atrás

README.md

FitText

FitText

Truncates the text nodes of elements to fit inside a container

How to use

Example:

HTML:

#HTML
<ul id="container">
    <li><span>Lorem ipsum dolor</span></li>
    <li><span>sit amet, consectetur adipisicing</span></li>
    <li><span>elit, sed do eiusmod tempor incididunt ut labore et</span></li>
</ul>

CSS:

#CSS
ul {
    list-style: none;
    width: 50%;
}

li {
    white-space: nowrap;
}

JavaScript

#JS
var myFitText = new FitText('container','li > span',{
  offset: 20,
  fitClass: 'fitted'
});

View the MooDoc for usage and examples.