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

  • 2.0.1
  • 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. If your project uses an older version of Tailwind, you should install the latest 1.x version of this plugin (npm install @benface/tailwindcss-reset@1.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

A few things:

  • Makes everything position: relative, so that absolutely positioned elements are relative to their parent by default
  • 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
  • Changes background-position’s default value from left top to center center
  • Changes background-repeat’s default value from repeat to no-repeat
  • Removes default styles on form elements (border radius, background color, inherit all the font/text properties that usually inherit, etc.)
  • Removes other opinionated styles set by user agent stylesheets (see reset.css to see them all)
  • Enforces display: none on [hidden] elements by adding !important so that it is not overridden by utility classes

FAQs

Package last updated on 15 Feb 2020

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