Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tailwindcss-contain

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tailwindcss-contain

A plugin that provides utilities for the [`contain`](https://developer.mozilla.org/en-US/docs/Web/CSS/contain) CSS property.

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
158
decreased by-19.39%
Maintainers
1
Weekly downloads
 
Created
Source

tailwindcss-contain

A plugin that provides utilities for the contain CSS property.

Installation

Install the plugin from npm:

npm install -D tailwindcss-contain

Then add the plugin to your tailwind.config.js file:

// tailwind.config.js
module.exports = {
  theme: {
    // ...
  },
  plugins: [
    require('tailwindcss-contain'),
    // ...
  ],
};

Usage

<div class="relative rounded-xl contain-paint">
  <div class="absolute inset-0 bg-black"></div>
</div>

All contain keywords are available as utility classes via this plugin.

The contain property also supports the use of multiple keywords. You can use Tailwind's arbitrary values to use multiple keywords with this plugin.

CSS RuleClass
contain: nonecontain-none
contain: strictcontain-strict
contain: contentcontain-content
contain: sizecontain-size
contain: inline-sizecontain-inline-size
contain: layoutcontain-layout
contain: stylecontain-style
contain: paintcontain-paint
contain: size layoutcontain-[size_layout]

Note: If using multiple keywords ensure they are separated by an underscore (_), rather than a space ( ).

FAQs

Package last updated on 23 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc