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

@benface/tailwindcss-reset

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@benface/tailwindcss-reset

Opinionated CSS reset to apply on top of Tailwind CSS’s Preflight

  • 3.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
67
increased by15.52%
Maintainers
1
Weekly downloads
 
Created
Source

Opinionated Reset Plugin for Tailwind CSS

Requirements

This plugin requires Tailwind CSS 1.2 or later, and is optimized for Tailwind CSS 3.x.

Installation

npm install @benface/tailwindcss-reset

Usage

// tailwind.config.js
module.exports = {
  corePlugins: {
    preflight: true /* the plugin extends Preflight so make sure it is not disabled */,
  },
  plugins: [require("@benface/tailwindcss-reset")],
};

What it does

  • Makes everything position: relative, so that absolutely positioned elements are relative to their parent by default.
  • Resets the margin and padding of all elements to 0.
  • Resets the min-width and min-height of all elements to 0, since the default is auto which can cause overflow issues with flex items.
  • Resets border-radius to 0, background-color to transparent, and background-image to none on all elements, just in case.
  • Sets better defaults for background-position (center center) and background-repeat (no-repeat).
  • Makes some elements display: block by default (button, input, select, textarea, label, and summary).
  • Makes the inheritable text properties (color, font, text-align, text-transform, and letter-spacing) inherit on form elements as well (button, input, etc.).
  • Changes the default overflow on svg elements from hidden to visible, to prevent clipping their edges (notably in Safari).
  • Removes opinionated styles set by user agent stylesheets and/or Preflight (see reset.css to see them all).
  • Enforces display: none on [hidden] elements by adding !important so that it cannot be overridden by utility classes.

What it does not do

  • It doesn’t remove the default focus rings, as not all projects need custom focus styles.
  • It doesn’t override the font-weight: bolder on b and strong elements.
  • It doesn’t override the font-style: italic on i and em elements.
  • It doesn’t override the text-decoration: underline on u and ins elements.
  • It doesn’t override the text-decoration: line-through on s, strike, and del elements.
  • It doesn’t override the font-size and positioning styles set by Preflight on sub and sup elements.

FAQs

Package last updated on 29 Jun 2022

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