Exciting release!Introducing "safe npm". Learn more
Socket
Log inDemoInstall

tailwindcss-line-clamp

Package Overview
Dependencies
1
Maintainers
1
Versions
6
Issues
File Explorer

Advanced tools

tailwindcss-line-clamp

TailwindCSS plugin to generate webkit line clamp utilities

    1.0.5latest
    GitHub

Version published
Maintainers
1
Weekly downloads
656
increased by3.47%

Weekly downloads

Readme

Source

TailwindCSS Line Clamp

TailwindCSS plugin to generate webkit line clamp utilities.

Installation

npm i tailwindcss-line-clamp --save-dev # or yarn add tailwindcss-line-clamp -D

Usage

{ theme: { lineClamp: { 1: 1, 2: 2, 3: 3 } }, plugins: [ require('tailwindcss-line-clamp') ], }

This will generate the following utilities:

.clamp-1 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; } .clamp-2 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } .clamp-3 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

Variants

By default, no variants are generated for these utilities. If you would like them, modify lineClamp in the variants section of your tailwind.config.js file.

{ variants: { lineClamp: ["responsive"]; } }

Browser Support

-webkit-line-clamp is not supported in ie11. If you need to accomodate these users you may need to reach for a JS or server-side solution.

Can I use: -webkit-line-clamp

Keywords

FAQs

Last updated on 22 May 2020

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc