New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

postcss-reset-important

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

postcss-reset-important

PostCSS plugin for reseting all styles using !important, and making your own styles !important

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

PostCSS plugin for reseting all styles using !important, and making your own styles !important. Mostly useful for browser extension content scripts and their CSS.

.foo {
  color: red;
}
.foo {
  margin: 0 !important;
  /* bunch of other stuff */

  color: red !important;
}

Usage

postcss([
  require('postcss-reset-important'),
])

Options

requireExplicit: boolean

Requires you to use the reset property to enable the transform for a rule. Defaults to false

noImportant: boolean

Doesn't use !important in the generated reset styles, and doesn't add it for your own styles.

reset

The 'reset' property can be used to control the plugin. If requireExplicit isn't set, the default is reset: true.

You can explicitly define it like so:

.foo {
  reset: true;
  color: red;
}

You can also disable the resets for an element.

.foo {
  reset: false;
  color: red;
}

TODO: add extra reset options for various html tags that generate different resets.

Keywords

postcss

FAQs

Package last updated on 19 Jan 2018

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