Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

postcss-discard-overridden

Package Overview
Dependencies
0
Maintainers
8
Versions
32
Issues
File Explorer

Advanced tools

postcss-discard-overridden

PostCSS plugin to discard overridden @keyframes or @counter-style.

    5.1.0latest

Version published
Maintainers
8
Weekly downloads
10,080,368
decreased by-12.91%

Weekly downloads

Readme

Source

PostCSS Discard Overridden

PostCSS plugin to discard overridden @keyframes or @counter-style.

@keyframes or @counter-style will be overridden by those who share the same identifiers and appear later in stylesheets. So we can discard all of them except the last one. When defined inside a @media or @supports rule, @keyframes and @counter-style rules only override global rules in some of the client browsers so they need handled separately. This plugin has taken care of this and transforms the PostCss AST safely.

@-webkit-keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 0.8; } } @keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 0.8; } } @media (max-width: 500px) { @-webkit-keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } } @-webkit-keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 0.8; } } @keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 0.8; } } @supports (display: flex) { @-webkit-keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } } } } @-webkit-keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } } @media (max-width: 500px) { @-webkit-keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 0.8; } } @keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 0.8; } } @supports (display: flex) { @-webkit-keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } } } } @-webkit-keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } }

Usage

See the PostCSS documentation for examples for your environment.

Contributors

See CONTRIBUTORS.md.

Keywords

FAQs

What is postcss-discard-overridden?

PostCSS plugin to discard overridden @keyframes or @counter-style.

Is postcss-discard-overridden popular?

The npm package postcss-discard-overridden receives a total of 8,113,470 weekly downloads. As such, postcss-discard-overridden popularity was classified as popular.

Is postcss-discard-overridden well maintained?

We found that postcss-discard-overridden demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 8 open source maintainers collaborating on the project.

Last updated on 01 Mar 2022

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc