{"id":28383862,"url":"https://github.com/cedaro/grunt-wp-css","last_synced_at":"2026-03-04T01:03:36.215Z","repository":{"id":16635920,"uuid":"19391117","full_name":"cedaro/grunt-wp-css","owner":"cedaro","description":"Format style sheets according to the WordPress CSS coding standards.","archived":false,"fork":false,"pushed_at":"2016-02-25T04:56:20.000Z","size":32,"stargazers_count":35,"open_issues_count":0,"forks_count":5,"subscribers_count":8,"default_branch":"develop","last_synced_at":"2025-05-30T08:15:03.396Z","etag":null,"topics":["coding-standards","grunt","wordpress"],"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/cedaro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-02T23:11:30.000Z","updated_at":"2024-04-04T14:30:26.000Z","dependencies_parsed_at":"2022-09-05T11:01:40.695Z","dependency_job_id":null,"html_url":"https://github.com/cedaro/grunt-wp-css","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/cedaro/grunt-wp-css","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedaro%2Fgrunt-wp-css","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedaro%2Fgrunt-wp-css/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedaro%2Fgrunt-wp-css/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedaro%2Fgrunt-wp-css/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cedaro","download_url":"https://codeload.github.com/cedaro/grunt-wp-css/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedaro%2Fgrunt-wp-css/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261962363,"owners_count":23236929,"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":["coding-standards","grunt","wordpress"],"created_at":"2025-05-30T07:38:09.980Z","updated_at":"2026-03-04T01:03:31.178Z","avatar_url":"https://github.com/cedaro.png","language":"JavaScript","readme":"# grunt-wp-css [![Build Status](https://travis-ci.org/cedaro/grunt-wp-css.png?branch=develop)](https://travis-ci.org/cedaro/grunt-wp-css)\n\n\u003e Format style sheets according to the [WordPress CSS coding standards](http://make.wordpress.org/core/handbook/coding-standards/css/).\n\n\n## Getting Started\n\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:\n\n```shell\nnpm install grunt-wp-css --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks( 'grunt-wp-css' );\n```\n\n## wpcss Task\n\n_Run this task with the `grunt wpcss` command._\n\n\n### Overview\n\nIn your project's Gruntfile, add a section named `wpcss` to the data object passed into `grunt.initConfig()`.\n\n```js\ngrunt.initConfig({\n    wpcss: {\n        target: {\n            options: {\n                commentSpacing: true, // Whether to clean up newlines around comments between CSS rules.\n                config: '',           // Which CSSComb config to use for sorting properties.\n            },\n            files: {}\n        }\n    }\n});\n```\nThis task supports the file mapping format Grunt supports. Please read [Globbing patterns](http://gruntjs.com/configuring-tasks#globbing-patterns) and [Building the files object dynamically](http://gruntjs.com/configuring-tasks#building-the-files-object-dynamically) for additional details.\n\n\n### Options\n\n#### options.commentSpacing\nType: `Boolean`  \nDefault value: `true`  \n*Optional*\n\nWhether the plugin should attempt to automatically correct spacing around comments that appear between rule declarations within the style sheet.\n\n#### options.config\nType: `String`  \nDefault value: `'default'`\n\nThe CSSComb configuration to use for sorting CSS properties. Possible values are `default` or `alphabetical`.\n\n\n## Contributors\n\nThanks to [Gary Jones](https://github.com/GaryJones) of [Gamajo Tech](http://gamajo.com/) for researching and providing the default configuration rules, among [many other improvements](https://github.com/cedaro/grunt-wp-css/commits?author=GaryJones).\n\n\n## Release History\n\n#### 0.2.1\n\nUpdated peer dependencies to support Grunt 1.0. See [#13](https://github.com/cedaro/grunt-wp-css/pull/13)\n\n#### 0.2.0\n\nThis is the [@GaryJones](https://github.com/GaryJones) release.\n\n* Updated the default CSScomb config ([0887c06](https://github.com/cedaro/grunt-wp-css/commit/0887c06993c7eeea2c716d2d9ba523f3663dfa8b)).\n* Updated the alphabetical CSScomb config to match improvements in the new default config.\n* Fixed the exports variable name in the tests.\n* Added Travis CI support.\n\n#### 0.1.0\n\n* Initial release.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcedaro%2Fgrunt-wp-css","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcedaro%2Fgrunt-wp-css","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcedaro%2Fgrunt-wp-css/lists"}