{"id":19653042,"url":"https://github.com/csstools/postcss-at-else","last_synced_at":"2025-04-28T17:31:18.820Z","repository":{"id":46200377,"uuid":"60943348","full_name":"csstools/postcss-at-else","owner":"csstools","description":"Use at-else inverted media queries in CSS","archived":false,"fork":false,"pushed_at":"2021-11-08T10:36:13.000Z","size":62,"stargazers_count":11,"open_issues_count":2,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-04-14T03:59:11.497Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://jonathantneal.github.io/postcss-at-else/","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":"2016-06-12T05:06:55.000Z","updated_at":"2023-01-18T19:16:28.000Z","dependencies_parsed_at":"2022-09-08T10:10:50.852Z","dependency_job_id":null,"html_url":"https://github.com/csstools/postcss-at-else","commit_stats":null,"previous_names":["jonathantneal/postcss-at-else"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-at-else","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-at-else/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-at-else/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-at-else/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csstools","download_url":"https://codeload.github.com/csstools/postcss-at-else/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222925097,"owners_count":17058757,"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-11-11T15:12:59.933Z","updated_at":"2024-11-11T15:13:00.490Z","avatar_url":"https://github.com/csstools.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @else \u003ca href=\"https://github.com/postcss/postcss\"\u003e\u003cimg src=\"https://postcss.github.io/postcss/logo.svg\" alt=\"PostCSS Logo\" width=\"90\" height=\"90\" align=\"right\"\u003e\u003c/a\u003e\n\n[![NPM Version][npm-img]][npm-url]\n[![Build Status][cli-img]][cli-url]\n[![Licensing][lic-image]][lic-url]\n[![Changelog][log-image]][log-url]\n[![Gitter Chat][git-image]][git-url]\n\n[@else] lets you use `@else` inverted media queries in CSS.\n\n```css\n/* before */\n\n@media (min-width: 30em) {\n\tbody {\n\t\tbackground-color: blue;\n\t}\n} @else {\n\tbody {\n\t\tbackground-color: yellow;\n\t}\n}\n\n\n/* after */\n\n@media (min-width: 30em) {\n\tbody {\n\t\tbackground-color: blue;\n\t}\n} @media (max-width: 29.999em) {\n\tbody {\n\t\tbackground-color: yellow;\n\t}\n}\n```\n\n## Usage\n\nAdd [@else] to your build tool:\n\n```bash\nnpm install postcss postcss-at-else --save-dev\n```\n\n#### PostCSS\n\nAdd [PostCSS] to your build tool:\n\n```bash\nnpm install postcss --save-dev\n```\n\nLoad [@else] as a PostCSS plugin:\n\n```js\npostcss([\n\trequire('postcss-at-else')({ /* options */ })\n]).process(YOUR_CSS, /* options */);\n```\n\n#### Gulp\n\nAdd [Gulp PostCSS] to your build tool:\n\n```bash\nnpm install gulp-postcss --save-dev\n```\n\nEnable [@else] within your Gulpfile:\n\n```js\nvar postcss = require('gulp-postcss');\n\ngulp.task('css', function () {\n\treturn gulp.src('./src/*.css').pipe(\n\t\tpostcss([\n\t\t\trequire('postcss-at-else')({ /* options */ })\n\t\t])\n\t).pipe(\n\t\tgulp.dest('.')\n\t);\n});\n```\n\n#### Grunt\n\nAdd [Grunt PostCSS] to your build tool:\n\n```bash\nnpm install grunt-postcss --save-dev\n```\n\nEnable [@else] within your Gruntfile:\n\n```js\ngrunt.loadNpmTasks('grunt-postcss');\n\ngrunt.initConfig({\n\tpostcss: {\n\t\toptions: {\n\t\t\tuse: [\n\t\t\t\trequire('postcss-at-else')({ /* options */ })\n\t\t\t]\n\t\t},\n\t\tdist: {\n\t\t\tsrc: '*.css'\n\t\t}\n\t}\n});\n```\n\n[npm-url]: https://www.npmjs.com/package/postcss-at-else\n[npm-img]: https://img.shields.io/npm/v/postcss-at-else.svg\n[cli-url]: https://travis-ci.org/jonathantneal/postcss-at-else\n[cli-img]: https://img.shields.io/travis/jonathantneal/postcss-at-else.svg\n[lic-url]: LICENSE.md\n[lic-image]: https://img.shields.io/npm/l/postcss-at-else.svg\n[log-url]: CHANGELOG.md\n[log-image]: https://img.shields.io/badge/changelog-md-blue.svg\n[git-url]: https://gitter.im/postcss/postcss\n[git-image]: https://img.shields.io/badge/chat-gitter-blue.svg\n\n[@else]: https://github.com/jonathantneal/postcss-at-else\n[PostCSS]: https://github.com/postcss/postcss\n[Gulp PostCSS]: https://github.com/postcss/gulp-postcss\n[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsstools%2Fpostcss-at-else","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsstools%2Fpostcss-at-else","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsstools%2Fpostcss-at-else/lists"}