{"id":20395449,"url":"https://github.com/jpeer264/postcss-rcs","last_synced_at":"2026-05-09T13:36:56.859Z","repository":{"id":21345895,"uuid":"92443737","full_name":"JPeer264/postcss-rcs","owner":"JPeer264","description":"The postcss plugin for rcs-core","archived":false,"fork":false,"pushed_at":"2022-12-06T17:46:50.000Z","size":723,"stargazers_count":2,"open_issues_count":12,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T22:14:31.783Z","etag":null,"topics":["css","minify","postcss","postcss-plugin","rcs","rename"],"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/JPeer264.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":"2017-05-25T20:55:27.000Z","updated_at":"2023-03-04T06:11:23.000Z","dependencies_parsed_at":"2023-01-12T03:45:29.563Z","dependency_job_id":null,"html_url":"https://github.com/JPeer264/postcss-rcs","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JPeer264%2Fpostcss-rcs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JPeer264%2Fpostcss-rcs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JPeer264%2Fpostcss-rcs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JPeer264%2Fpostcss-rcs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JPeer264","download_url":"https://codeload.github.com/JPeer264/postcss-rcs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241945473,"owners_count":20046865,"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":["css","minify","postcss","postcss-plugin","rcs","rename"],"created_at":"2024-11-15T03:57:31.914Z","updated_at":"2026-05-09T13:36:56.801Z","avatar_url":"https://github.com/JPeer264.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# postcss-rcs\n\n[![Build Status](https://travis-ci.org/JPeer264/postcss-rcs.svg?branch=master)](https://travis-ci.org/JPeer264/postcss-rcs)\n[![Coverage Status](https://coveralls.io/repos/github/JPeer264/postcss-rcs/badge.svg?branch=master)](https://coveralls.io/github/JPeer264/postcss-rcs?branch=master)\n\n\u003e The PostCSS plugin for [rcs-core](https://github.com/JPeer264/node-rcs-core)\n\n## Installation\n\n```sh\n$ npm i postcss-rcs -S\n```\n\nor\n\n```sh\n$ yarm add postcss-rcs\n```\n\n## Usage\n\n```js\npostcss([ require('postcss-rcs') ])\n```\n\nSee [PostCSS](https://github.com/postcss/postcss) docs for examples for your environment.\n\n## What does it do\n\n```css\n@keyframes move {\n  from {}\n  to {}\n}\n\n@media screen and (min-width: 480px) {\n  .selector {\n    background-color: lightgreen;\n    animation: move 4s infinite;\n    animation-name: move;\n  }\n}\n\n.main.selector {\n  border: 1px solid black;\n}\n\nul li {\n  padding: 5px;\n}\n```\n\nwill be processed to:\n\n```css\n@keyframes move {\n  from {}\n  to {}\n}\n\n@media screen and (min-width: 480px) {\n  .a {\n    background-color: lightgreen;\n    animation: move 4s infinite;\n    animation-name: move;\n  }\n}\n\n.b.a {\n  border: 1px solid black;\n}\n\nul li {\n  padding: 5px;\n}\n```\n\n## Options\n\nCall the plugin to set options:\n\n```js\npostcss([ require('postcss-simple-vars')({ replaceKeyframes: true }) ])\n```\n\n- [replaceKeyframes](#replacekeyframes)\n- [ignoreAttributeSelectors](#ignoreattributeselectors)\n- [prefix](#prefix)\n- [suffix](#suffix)\n\n### replaceKeyframes\n\nReplaces `animation` and `animation-name` if a specific `@keyframes` is set.\n\nType: `boolean`\n\nDefault: `false`\n\nExample:\n\n```css\n// { replaceKeyframes: true }\n@keyframes move {\n  from {}\n  to {}\n}\n\n.selector {\n  animation: move 4s infinite;\n  animation-name: move;\n}\n```\n\nwill be processed to:\n\n```css\n// { replaceKeyframes: true }\n@keyframes a {\n  from {}\n  to {}\n}\n\n.b {\n  animation: a 4s infinite;\n  animation-name: a;\n}\n```\n\n### ignoreAttributeSelectors\n\nIf set to `true` it does not care about attribute selectors. If set to `false` the attribute selector `[class$=\"lector\"]` will not rename `.selector` as it the class ends with `lector`.\n\nType: `boolean`\n\nDefault: `false`\n\nExample:\n\n**{ ignoreAttributeSelectors: false }**\n```css\n.move[class$=\"lector\"] {}\n.selector {}\n```\n\nwill be process to:\n```css\n.a[class$=\"lector\"] {}\n.selector {}\n```\n\n**{ ignoreAttributeSelectors: true }**\n```css\n.move[class$=\"lector\"] {}\n.selector {}\n```\n\nwill be process to:\n```css\n.a[class$=\"lector\"] {}\n.b {}\n```\n\n### prefix\n\nPrefixes every selectors and attribute selectors (if `ignoreAttributeSelectors` is `false`).\n\nType: `string`\n\nDefault: `''`\n\nExample:\n```css\n// { ignoreAttributeSelectors: false, prefix: 'pre-' }\n.move[class^=\"sel\"] {}\n.selector {}\n```\n\nwill be process to:\n```css\n// { ignoreAttributeSelectors: false, prefix: 'pre-' }\n.pre-a[class^=\"pre-sel\"] {}\n.pre-selector {}\n```\n\n### suffix\n\nSuffixes every selectors and attribute selectors (if `ignoreAttributeSelectors` is `false`).\n\nType: `string`\n\nDefault: `''`\n\nExample:\n```css\n// { ignoreAttributeSelectors: false, suffix: '-suf' }\n.move[class$=\"lector\"] {}\n.selector {}\n```\n\nwill be process to:\n```css\n// { ignoreAttributeSelectors: false, suffix: '-suf' }\n.a-suf[class$=\"lector-suf\"] {}\n.selector-suf {}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpeer264%2Fpostcss-rcs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpeer264%2Fpostcss-rcs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpeer264%2Fpostcss-rcs/lists"}