7.0.0 • Published 1 day ago

postcss-discard-overridden v7.0.0

Weekly downloads
8,468,645
License
MIT
Repository
github
Last release
1 day ago

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.

cssnano-preset-defaultvuedragdropuploadimagescloud-archive-s3bb-chat@fundefund/funde_ckgql_din_mod@olivervorasai/slidercogoportutils@saaspe/componentsexpand-react-bridgesklif-ui-kitsklif-api@everything-registry/sub-chunk-2460@314oner_npm/universal-components-libraryp149-tabletest-popupssklif-uieasyplayer-myp147-tablep148-tablenka-gantt-task-reactnois-react-toastmicroend-componentmggauharpickupbiz-npm-packagenuxtpaginationsprasadacmpileuleuyanteang-search-dropdownmy-library-buttonpatepangdeuiera-ckeditor5gerimismalamseninemr-tabulator-tableses-react-bridgeex-ikon-components-libraryflowable-bpmn-modelergarnish-uifhir2generator-bootstrap-boilerplate-templatehantil-csshot-zone-vuejulien-easy-modallitepie-datepicker-gabemavectram2m-chartjs-plugin-crosshairkafirchain-tetrismangudinlagirajinjesusdemonewdemo1react-ang-notifications-honey-comb-setupreact-dottiereactofy-css-libraryresponsis-gantt-task-reactremap-cssreact-lightbox-pack-18supportcrud-duick@knooks/use-titletingzi-vuepress@ozancakir/ckeditor5-build-inline-balloon@percent/percent-api-hookstohsaka888-use-breakpoint@sak1sham/react-toc-highlightsearch-list-reactsearch-input-reactsedanbosoksequelcomponent@fabwcie/ckeditor5-previewdesign-system-trial-milyasbpadigital-keyboard-demosdirectus-extension-layout-boilerplatedirectus-extension-filepreview-interface-sbndirectus-extension-delete-users-with-files@oriduk/ckeditor5-rebuild-musicanote@oriduk/ckeditor5-rebuild-oriduktaman-baca-masyarakatcssesc-wbgcssnano-paras20xxcssnano-preset-miniapp@kommunicate/kommunicate-chatbot-plugintehmusimhujan@kristoffertonning/vue-laravel-errorscrm-1.0.1@leiyulf/gantt-task-react@ikon-x/ckeditor5-custom-build-for-irrosoft@img-arena/img-ui-mui-theme@img-arena/ui-core@infinitebrahmanuniverse/nolb-postcss-d@itsridhopratama/taman-baca-masyarakat@itayn-fireberry-org/itayn-teststyle-guide-main@ngxvoice/ngx-voicelistner@luciadias/storybook-notimationtestapatestujsk_custom_ckeditor5custome-package-aminsummerseatestlreact-solid-gradient-picker@juanaraneta/dept-central-lib-client@junvary/quasar-ui-qcascader
7.0.0

1 day ago

6.0.2

2 months ago

6.0.1

4 months ago

6.0.0

1 year ago

5.1.0

2 years ago

5.0.4

2 years ago

5.0.3

2 years ago

5.0.2

2 years ago

5.0.1

3 years ago

5.0.0

3 years ago

5.0.0-rc.2

3 years ago

5.0.0-rc.1

3 years ago

5.0.0-rc.0

3 years ago

4.0.1

6 years ago

4.0.0

6 years ago

4.0.0-rc.2

7 years ago

4.0.0-rc.0

7 years ago

0.1.1

8 years ago

0.1.0

8 years ago