- Clone the repo:
git clone git@github.com:foxieboy/dotstail.git
- Install with npm:
npm install --save dotstail
- Or download the latest release
In other to use dotstail:
- The element you want to have a text elipsis effect must have a CSS
line-height property
(must be aem
unit). - In your script file, set dotstail function for the element:
dotstail.setDot ({
'element': '*your element class or id here*',
'letter': 0,
'lines': 4
});
- Please keep in mind:
letter
, andline
option are optional, use them if you want to. Also those options must be anumber
, notstring
.
Call the function by dotstail.setDot ();
element
: is your element class/Idletter
: is the number of letter you want to cut out at the end of the last line.lines
: is the number of line you want your element to have atext elipsis
effect.
public/
└── theme/
└── js/
└── dotstail.min.js
- Semantically Correct / Valid HTML Code
- HTML5, CSS3
- Javascript / JS6
- Full project and seed project (build with: Gulp, Sass, Javascript, Npm)
- Cross browser compatible ( Internet Explorer 10+, Firefox, Safari, Opera, Chrome etc. )
- W3C Valid source code, properly formatted and commented
Code and documentation copyright 2017, MIT license.