New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

tailwindcss-safe-area

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tailwindcss-safe-area

Safe area inset utilities using the existing padding/margin syntax

0.2.1
Source
npm
Version published
Weekly downloads
24K
-22.34%
Maintainers
1
Weekly downloads
 
Created
Source

tailwindcss-safe-area

Safe area inset utilities using the existing padding/margin syntax

Getting started

npm install --dev tailwindcss-safe-area

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

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

Usage

This plugin extends the padding and margin utilities.

Use the *-safe utilities:

<header class="pt-safe">
  <h1>Ciao!</h1>
</header>

<main class="pb-safe">
  <p>
    Lorem ipsum dolor sit, amet consectetur adipisicing elit. Voluptate itaque blanditiis eum
    aperiam velit eaque aliquam, ex harum quisquam. Et consequuntur ipsa accusamus provident quae
    magni, earum suscipit laboriosam aperiam!
  </p>
</main>

Provided utilities

UtilitiesStyles
m-safe, p-safeenv(safe-area-inset-{top, right, bottom, left})
mx-safe, px-safeenv(safe-area-inset-{right, left})
my-safe, py-safeenv(safe-area-inset-{top, bottom})
mt-safe, pt-safeenv(safe-area-inset-top)
mr-safe, pr-safeenv(safe-area-inset-right)
mb-safe, pb-safeenv(safe-area-inset-bottom)
ml-safe, pl-safeenv(safe-area-inset-left)
min-h-screen-safe, h-screen-safecalc(100vh - (env(safe-area-inset-top) + env(safe-area-inset-bottom)))
-webkit-fill-available

Keywords

tailwindcss

FAQs

Package last updated on 27 Feb 2021

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