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

postcss-initial

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-initial

PostCSS plugin to fallback initial keyword.

  • 3.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is postcss-initial?

The postcss-initial package is a PostCSS plugin that allows you to reset CSS properties to their initial values. This can be particularly useful for ensuring consistent styling across different browsers and for resetting styles in complex CSS structures.

What are postcss-initial's main functionalities?

Resetting all properties

This feature allows you to reset all CSS properties of an element to their initial values using the 'all' shorthand property.

/* Input CSS */
.element {
  all: initial;
}

/* Output CSS */
.element {
  all: initial;
}

Resetting specific properties

This feature allows you to reset specific CSS properties to their initial values. This can be useful for selectively resetting styles without affecting other properties.

/* Input CSS */
.element {
  color: initial;
  font-size: initial;
}

/* Output CSS */
.element {
  color: initial;
  font-size: initial;
}

Using with other PostCSS plugins

This feature demonstrates how to integrate postcss-initial with other PostCSS plugins in a build process. You can configure the plugin to reset all properties, only inherited properties, or none.

const postcss = require('postcss');
const initial = require('postcss-initial');

postcss([
  initial({
    reset: 'all' // or 'inherited' or 'none'
  })
]).process(yourCSS).then(result => {
  console.log(result.css);
});

Other packages similar to postcss-initial

Keywords

FAQs

Package last updated on 14 Apr 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

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