Skip to content

LeMarck/webkit-line-clamp

Repository files navigation

webkit-line-clamp

Build Status MIT License NPM Version

JS polyfill CSS property -webkit-line-clamp. Works with nested DOM nodes.

Browsers support

Can I use: -webkit-line-clamp

Installation

$ yarn add webkit-line-clamp
# or
$ npm install webkit-line-clamp

Usage

import webkitLineClamp from 'webkit-line-clamp';
// or 
import { webkitLineClamp } from 'webkit-line-clamp';

webkitLineClamp(document.getElementById('text'), 3);

License

MIT License