package.json 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. {
  2. "name": "postcss-discard-overridden",
  3. "version": "5.0.2",
  4. "description": "PostCSS plugin to discard overridden @keyframes or @counter-style.",
  5. "main": "dist/index.js",
  6. "files": [
  7. "LICENSE",
  8. "dist"
  9. ],
  10. "keywords": [
  11. "postcss",
  12. "css",
  13. "postcss-plugin",
  14. "at-rules",
  15. "@keyframes",
  16. "@counter-style"
  17. ],
  18. "author": "Justineo <justice360@gmail.com>",
  19. "license": "MIT",
  20. "repository": "cssnano/cssnano",
  21. "bugs": {
  22. "url": "https://github.com/cssnano/cssnano/issues"
  23. },
  24. "homepage": "https://github.com/cssnano/cssnano",
  25. "engines": {
  26. "node": "^10 || ^12 || >=14.0"
  27. },
  28. "devDependencies": {
  29. "postcss": "^8.2.15"
  30. },
  31. "peerDependencies": {
  32. "postcss": "^8.2.15"
  33. },
  34. "scripts": {
  35. "prebuild": "rimraf dist",
  36. "build": "babel src --config-file ../../babel.config.json --out-dir dist --ignore \"**/__tests__/\""
  37. },
  38. "readme": "# PostCSS Discard Overridden\n\n[PostCSS] plugin to discard overridden `@keyframes` or `@counter-style`.\n\n`@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**.\n\n[PostCSS]: https://github.com/postcss/postcss\n\n```css\n@-webkit-keyframes fade-in {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 0.8;\n }\n}\n@keyframes fade-in {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 0.8;\n }\n}\n@media (max-width: 500px) {\n @-webkit-keyframes fade-in {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n @keyframes fade-in {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n @-webkit-keyframes fade-in {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 0.8;\n }\n }\n @keyframes fade-in {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 0.8;\n }\n }\n @supports (display: flex) {\n @-webkit-keyframes fade-in {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n @keyframes fade-in {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n }\n}\n@-webkit-keyframes fade-in {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n@keyframes fade-in {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n```\n\n```css\n@media (max-width: 500px) {\n @-webkit-keyframes fade-in {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 0.8;\n }\n }\n @keyframes fade-in {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 0.8;\n }\n }\n @supports (display: flex) {\n @-webkit-keyframes fade-in {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n @keyframes fade-in {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n }\n}\n@-webkit-keyframes fade-in {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n@keyframes fade-in {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n```\n\n## Usage\n\nSee the [PostCSS documentation](https://github.com/postcss/postcss#usage) for\nexamples for your environment.\n\n## Contributors\n\nSee [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/master/CONTRIBUTORS.md).\n"
  39. }