{"id":20572492,"url":"https://github.com/nucliweb/postcss-magic-animations","last_synced_at":"2025-06-26T23:08:41.332Z","repository":{"id":57328169,"uuid":"57066389","full_name":"nucliweb/postcss-magic-animations","owner":"nucliweb","description":"PostCSS plugin that adds @keyframes from Magic Animations | v0.3.0","archived":false,"fork":false,"pushed_at":"2017-02-20T22:41:13.000Z","size":709,"stargazers_count":41,"open_issues_count":0,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-14T17:11:52.653Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nucliweb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-25T18:36:21.000Z","updated_at":"2022-07-18T10:47:54.000Z","dependencies_parsed_at":"2022-08-23T14:01:14.874Z","dependency_job_id":null,"html_url":"https://github.com/nucliweb/postcss-magic-animations","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nucliweb%2Fpostcss-magic-animations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nucliweb%2Fpostcss-magic-animations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nucliweb%2Fpostcss-magic-animations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nucliweb%2Fpostcss-magic-animations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nucliweb","download_url":"https://codeload.github.com/nucliweb/postcss-magic-animations/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248923765,"owners_count":21183953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T05:20:46.985Z","updated_at":"2025-04-14T17:11:57.533Z","avatar_url":"https://github.com/nucliweb.png","language":"JavaScript","readme":"# PostCSS Magic Animations [![Build Status][ci-img]][ci]\n\n[PostCSS]: https://github.com/postcss/postcss\n[ci-img]:  https://travis-ci.org/nucliweb/postcss-magic-animations.svg\n[ci]:      https://travis-ci.org/nucliweb/postcss-magic-animations\n\n[PostCSS](https://github.com/postcss/postcss/) plugin that adds `@keyframes` from [Magic Animations](https://github.com/miniMAC/magic)\n\n![Screen](./magic.gif)\n\n#### Input\n```css\n.animation {\n  animation-name: magic;\n}\n```\n\n#### Output\n```css\n.animation {\n  animation-name: magic;\n}\n@keyframes magic {\n  0% {\n    opacity: 1;\n    transform-origin: 100% 200%;\n    transform: scale(1, 1) rotate(0deg);\n  }\n  100% {\n    opacity: 0;\n    transform-origin: 200% 500%;\n    transform: scale(0, 0) rotate(270deg);\n  }\n}\n```\n\n## Install\n```\nnpm install postcss-magic-animations --save-dev\n```\n\n## Usage\n\n```js\npostcss([ require('postcss-magic-animations') ])\n```\n\nSee [PostCSS](https://github.com/postcss/postcss) docs for examples for your environment.\n\n## Options\n\nCall plugin function to set options:\n\n```js\npostcss([ require('postcss-magic-animations({atRoot: true})') ])\n```\n\n### `atRoot`\n\nDefines `atRoot: true` to prevent the `@keyframes` can be nested in a ​**media queries**\n\n#### Input\n```css\n@media only screen and (min-width: 600px) {\n  .animation {\n    animation-name: magic;\n  }\n}\n```\n\n#### Output\n```css\n@media only screen and (min-width: 600px) {\n  .animation {\n    animation-name: magic;\n  }\n}\n@keyframes magic {\n  0% {\n    opacity: 1;\n    transform-origin: 100% 200%;\n    transform: scale(1, 1) rotate(0deg);\n  }\n  100% {\n    opacity: 0;\n    transform-origin: 200% 500%;\n    transform: scale(0, 0) rotate(270deg);\n  }\n}\n\n```\n\n\n## Thanks\n* [@miniMAC](https://github.com/miniMAC) for [magic](https://github.com/miniMAC/magic)\n* [@zhouwenbin](https://github.com/zhouwenbin) for the inspiration with [PostCSS Animation](https://github.com/zhouwenbin/postcss-animation)\n* [@carlosvillu](https://github.com/carlosvillu) for the help to get a ninja code\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnucliweb%2Fpostcss-magic-animations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnucliweb%2Fpostcss-magic-animations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnucliweb%2Fpostcss-magic-animations/lists"}