{"id":14968188,"url":"https://github.com/johno/postcss-class-repeat","last_synced_at":"2026-01-24T05:03:29.134Z","repository":{"id":57327849,"uuid":"53089337","full_name":"johno/postcss-class-repeat","owner":"johno","description":"Repeat class selectors to increase specificity","archived":false,"fork":false,"pushed_at":"2017-11-06T15:42:45.000Z","size":6,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-13T17:37:09.299Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/johno.png","metadata":{"files":{"readme":"readme.md","changelog":null,"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-03-03T22:36:02.000Z","updated_at":"2020-06-16T07:49:09.000Z","dependencies_parsed_at":"2022-09-17T11:12:39.987Z","dependency_job_id":null,"html_url":"https://github.com/johno/postcss-class-repeat","commit_stats":null,"previous_names":["johnotander/postcss-class-repeat"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johno%2Fpostcss-class-repeat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johno%2Fpostcss-class-repeat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johno%2Fpostcss-class-repeat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johno%2Fpostcss-class-repeat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johno","download_url":"https://codeload.github.com/johno/postcss-class-repeat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239483870,"owners_count":19646426,"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-09-24T13:39:30.286Z","updated_at":"2025-11-06T05:30:26.677Z","avatar_url":"https://github.com/johno.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# postcss-class-repeat [![Build Status](https://secure.travis-ci.org/johnotander/postcss-class-repeat.png?branch=master)](https://travis-ci.org/johnotander/postcss-class-repeat) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)\n\nRepeat class selectors to increase specificity, useful for using utility classes with legacy codebases with high specificity\n\n## Installation\n\n```bash\nnpm install --save postcss-class-repeat\n```\n\n## Usage\n\n```javascript\nvar postcss = require('postcss')\nvar classRepeat = require('postcss-class-repeat')\n\npostcss([ classRepeat() ]).process(myCss).css\n```\n\n#### Input\n\n```css\n.foo.bar,\n.baz:before {\n  color: tomato;\n}\n\n.hello \u003e .world {\n  background-color: tomato;\n}\n\n@media screen and (min-width: 123em) {\n  .yay { color: red; }\n}\n```\n\n#### Output\n\n```css\n.foo.foo.bar.bar,\n.baz.baz:before {\n  color: tomato;\n}\n\n.hello.hello \u003e .world.world {\n  background-color: tomato;\n}\n\n@media screen and (min-width: 123em) {\n  .yay.yay { color: red; }\n}\n```\n\n##### Options\n\n- `repeat`: Number, amount of times to repeat the class selectors. Default: `2`\n\n###### Using custom options\n\n```javascript\nvar postcss = require('postcss')\nvar classRepeat = require('postcss-class-repeat')\n\npostcss([ classRepeat({ repeat: 4 }) ]).process(myCss).css\n```\n\n```css\n.foo.foo.foo.foo.bar.bar.bar.bar,\n.baz.baz.baz.baz:before {\n  color: tomato;\n}\n\n.hello.hello.hello.hello \u003e .world.world.world.world {\n  background-color: tomato;\n}\n\n@media screen and (min-width: 123em) {\n  .yay.yay.yay.yay { color: red; }\n}\n```\n\n## Related\n\n* \u003chttps://github.com/johnotander/class-repeat\u003e\n\n## License\n\nMIT\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\nCrafted with \u003c3 by John Otander ([@4lpine](https://twitter.com/4lpine)).\n\n***\n\n\u003e This package was initially generated with [yeoman](http://yeoman.io) and the [p generator](https://github.com/johnotander/generator-p.git).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohno%2Fpostcss-class-repeat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohno%2Fpostcss-class-repeat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohno%2Fpostcss-class-repeat/lists"}