{"id":15041832,"url":"https://github.com/csstools/postcss-sass","last_synced_at":"2025-04-04T15:11:45.743Z","repository":{"id":43318237,"uuid":"109352202","full_name":"csstools/postcss-sass","owner":"csstools","description":"Use Sass as a PostCSS plugin","archived":false,"fork":false,"pushed_at":"2024-12-27T18:29:21.000Z","size":320,"stargazers_count":140,"open_issues_count":1,"forks_count":34,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-10T23:54:59.971Z","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":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/csstools.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-03T04:30:14.000Z","updated_at":"2025-01-25T09:48:13.000Z","dependencies_parsed_at":"2025-01-18T05:07:42.234Z","dependency_job_id":"41b8da6d-3d90-4c10-a0f7-0a8ea0252d65","html_url":"https://github.com/csstools/postcss-sass","commit_stats":{"total_commits":35,"total_committers":12,"mean_commits":"2.9166666666666665","dds":0.7142857142857143,"last_synced_commit":"d5a28ea24ac792a69e3768672524c1c45f676442"},"previous_names":["jonathantneal/postcss-sass"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-sass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-sass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-sass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-sass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csstools","download_url":"https://codeload.github.com/csstools/postcss-sass/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244479818,"owners_count":20459453,"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-24T20:46:31.519Z","updated_at":"2025-03-21T13:17:30.061Z","avatar_url":"https://github.com/csstools.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PostCSS Sass [\u003cimg src=\"https://postcss.github.io/postcss/logo.svg\" alt=\"PostCSS Logo\" width=\"90\" height=\"90\" align=\"right\"\u003e][postcss]\n\n[![NPM Version][npm-img]][npm-url]\n[![test](https://github.com/csstools/postcss-sass/actions/workflows/test.yml/badge.svg)](https://github.com/csstools/postcss-sass/actions/workflows/test.yml)\n[\u003cimg alt=\"Discord\" src=\"https://shields.io/badge/Discord-5865F2?logo=discord\u0026logoColor=white\"\u003e][discord]\n\n[PostCSS Sass] lets you use [Sass] as a [PostCSS] plugin.\n\n```scss\n$font-stack:    Helvetica, sans-serif;\n$primary-color: #333;\n\n:root {\n  color: $primary-color;\n  font: 100% $font-stack;\n}\n\n/* becomes */\n\n:root {\n  color: #333;\n  font: 100% Helvetica, sans-serif;\n}\n```\n\n[PostCSS Sass] uses [dart-sass], letting you safely run transforms before and\nafter Sass, watching for changes to Sass imports, and preserving source maps.\n\n## Usage\n\nAdd [PostCSS Sass] to your build tool:\n\n```sh\nnpm install postcss @csstools/postcss-sass --save-dev\n```\n\n#### Node\n\nUse [PostCSS Sass] to process your CSS:\n\n```js\nrequire('@csstools/postcss-sass').process(YOUR_CSS);\n```\n\n#### PostCSS\n\nUse [PostCSS Sass] as a plugin:\n\n```js\npostcss([\n  require('@csstools/postcss-sass')(/* dart-sass options */)\n]).process(YOUR_CSS);\n```\n\nThe standard CSS parser included with PostCSS may not be able to parse SCSS\nspecific features like inline comments. To accurately parse SCSS, use\nthe [SCSS Parser].\n\n```bash\nnpm install postcss-scss --save-dev\n```\n\n```js\nconst postcss = require('postcss');\nconst postcssSass = require('@csstools/postcss-sass');\n\npostcss([\n  postcssSass(/* pluginOptions */)\n]).process(YOUR_CSS, {\n  syntax: require('postcss-scss')\n});\n```\n\n#### Gulp\n\nAdd [Gulp PostCSS] to your build tool:\n\n```sh\nnpm install gulp-postcss --save-dev\n```\n\nUse [PostCSS Sass] in your Gulpfile:\n\n```js\nvar postcss = require('gulp-postcss');\n\ngulp.task('css', function () {\n  return gulp.src('./src/*.css').pipe(\n    postcss([\n      require('@csstools/postcss-sass')(/* dart-sass options */)\n    ])\n  ).pipe(\n    gulp.dest('.')\n  );\n});\n```\n\n#### Grunt\n\nAdd [Grunt PostCSS] to your build tool:\n\n```sh\nnpm install grunt-postcss --save-dev\n```\n\nUse [PostCSS Sass] in your Gruntfile:\n\n```js\ngrunt.loadNpmTasks('grunt-postcss');\n\ngrunt.initConfig({\n  postcss: {\n    options: {\n      use: [\n        require('@csstools/postcss-sass')(/* dart-sass options */)\n      ]\n    },\n    dist: {\n      src: '*.css'\n    }\n  }\n});\n```\n\n## Options\n\n[PostCSS Sass] options are directly forwarded to [dart-sass options].\n\n[cli-img]: https://img.shields.io/travis/jonathantneal/postcss-sass.svg\n[git-img]: https://img.shields.io/badge/support-chat-blue.svg\n[git-url]: https://gitter.im/postcss/postcss\n[npm-img]: https://img.shields.io/npm/v/@csstools/postcss-sass.svg\n[npm-url]: https://www.npmjs.com/package/@csstools/postcss-sass\n\n[Gulp PostCSS]: https://github.com/postcss/gulp-postcss\n[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss\n[dart-sass]: https://github.com/sass/dart-sass\n[dart-sass options]: https://github.com/sass/dart-sass#javascript-api\n[PostCSS]: https://github.com/postcss/postcss\n[PostCSS Sass]: https://github.com/csstools/postcss-sass\n[Sass]: https://github.com/sass/dart-sass\n[SCSS Parser]: https://github.com/postcss/postcss-scss\n[discord]: https://discord.gg/bUadyRwkJS\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsstools%2Fpostcss-sass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsstools%2Fpostcss-sass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsstools%2Fpostcss-sass/lists"}