{"id":13397234,"url":"https://github.com/csstools/precss","last_synced_at":"2026-01-14T12:54:44.632Z","repository":{"id":34678368,"uuid":"38651768","full_name":"csstools/precss","owner":"csstools","description":"Use Sass-like markup in your CSS","archived":true,"fork":false,"pushed_at":"2022-01-07T10:41:50.000Z","size":420,"stargazers_count":1597,"open_issues_count":28,"forks_count":77,"subscribers_count":29,"default_branch":"master","last_synced_at":"2026-01-12T05:04:50.333Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://jonathantneal.github.io/precss/","language":"CSS","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":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-06T23:21:52.000Z","updated_at":"2025-11-24T16:34:47.000Z","dependencies_parsed_at":"2022-08-28T13:01:10.841Z","dependency_job_id":null,"html_url":"https://github.com/csstools/precss","commit_stats":null,"previous_names":["jonathantneal/precss","jonathantneal/postcss-sassy"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/csstools/precss","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fprecss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fprecss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fprecss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fprecss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csstools","download_url":"https://codeload.github.com/csstools/precss/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fprecss/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28420814,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-07-30T18:01:13.278Z","updated_at":"2026-01-14T12:54:44.616Z","avatar_url":"https://github.com/csstools.png","language":"CSS","readme":"# PreCSS [\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[![Build Status][cli-img]][cli-url]\n[![Support Chat][git-img]][git-url]\n\n[PreCSS] lets you use Sass-like markup and staged CSS features in CSS.\n\n```scss\n$blue: #056ef0;\n$column: 200px;\n\n.menu {\n  width: calc(4 * $column);\n}\n\n.menu_link {\n  background: $blue;\n  width: $column;\n}\n\n/* becomes */\n\n.menu {\n  width: calc(4 * 200px);\n}\n\n.menu_link {\n  background: #056ef0;\n  width: 200px;\n}\n```\n\nPreCSS combines Sass-like syntactical sugar — like variables, conditionals, and\niterators — with emerging CSS features — like logical and custom properties,\nmedia query ranges, and image sets.\n\n## Usage\n\nAdd [PreCSS] to your build tool:\n\n```bash\nnpm install precss --save-dev\n```\n\n#### Node\n\nUse [PreCSS] to process your CSS:\n\n```js\nimport precss from 'precss';\n\nprecss.process(YOUR_CSS);\n```\n\n#### PostCSS\n\nAdd [PostCSS] to your build tool:\n\n```bash\nnpm install postcss --save-dev\n```\n\nUse [PreCSS] as a plugin:\n\n```js\nimport postcss from 'postcss';\nimport precss from 'precss';\n\npostcss([\n  precss(/* options */)\n]).process(YOUR_CSS);\n```\n\n#### Gulp\n\nAdd [Gulp PostCSS] to your build tool:\n\n```bash\nnpm install gulp-postcss --save-dev\n```\n\nUse [PreCSS] in your Gulpfile:\n\n```js\nimport postcss from 'gulp-postcss';\nimport precss from 'precss';\n\ngulp.task('css', function () {\n  return gulp.src('./src/*.css').pipe(\n    postcss([\n      precss(/* options */)\n    ])\n  ).pipe(\n    gulp.dest('.')\n  );\n});\n```\n\n#### Grunt\n\nAdd [Grunt PostCSS] to your build tool:\n\n```bash\nnpm install grunt-postcss --save-dev\n```\n\nUse [PreCSS] in your Gruntfile:\n\n```js\nimport precss from 'precss';\n\ngrunt.loadNpmTasks('grunt-postcss');\n\ngrunt.initConfig({\n  postcss: {\n    options: {\n      use: [\n        precss(/* options */)\n      ]\n    },\n    dist: {\n      src: '*.css'\n    }\n  }\n});\n```\n\n# Plugins\n\nPreCSS is powered by the following plugins (in this order):\n\n- [postcss-extend-rule](https://github.com/jonathantneal/postcss-extend-rule)\n- [postcss-advanced-variables](https://github.com/jonathantneal/postcss-advanced-variables)\n- [postcss-preset-env](https://github.com/jonathantneal/postcss-preset-env)\n- [postcss-atroot](https://github.com/OEvgeny/postcss-atroot)\n- [postcss-property-lookup](https://github.com/simonsmith/postcss-property-lookup)\n- [postcss-nested](https://github.com/postcss/postcss-nested)\n\n[cli-img]: https://img.shields.io/travis/jonathantneal/precss/master.svg\n[cli-url]: https://travis-ci.org/jonathantneal/precss\n[git-img]: https://img.shields.io/badge/chat-gitter-blue.svg\n[git-url]: https://gitter.im/postcss/postcss\n[npm-img]: https://img.shields.io/npm/v/precss.svg\n[npm-url]: https://www.npmjs.com/package/precss\n\n[Gulp PostCSS]: https://github.com/postcss/gulp-postcss\n[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss\n[PostCSS]: https://github.com/postcss/postcss\n[PreCSS]: https://github.com/jonathantneal/precss\n","funding_links":[],"categories":["CSS"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsstools%2Fprecss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsstools%2Fprecss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsstools%2Fprecss/lists"}