Skip to content

netlify/tailwindcss-first-line

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tailwindcss plugin for :first-line

This Tailwind plugin implements the CSS :first-line pseudo-element

Installation

npm install --save-dev @netlify/tailwindcss-first-line

or

yarn add -D @netlify/tailwindcss-first-line

Usage

// tailwind.config.js

module.exports = {
    ...
    plugins: [
        require('@netlify/tailwindcss-first-line'),
        ...
    ]
}

Then, add the first-line variant to each property you'd like to use it with.

    textColor: [
      'responsive',
      'hover',
      'focus',
      'first-line',
    ],

You can then use it by preprending first-line: to your classes, like first-line:your-class.

For example, to change the color of the first line of a paragraph to white, you would write first-line:text-white.

If you have a prefix set in your config (e.g. tw), you would use the following syntax: first-line:tw-text-white.

:first-line only applies to block-level elements.

About

Tailwind plugin for the :first-line CSS pseudo-element

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published