{"id":21448975,"url":"https://github.com/stackcss/sheetify-custom-media","last_synced_at":"2025-03-17T02:12:05.323Z","repository":{"id":21500946,"uuid":"24819907","full_name":"stackcss/sheetify-custom-media","owner":"stackcss","description":"Spec compliant CSS custom media query syntax for sheetify","archived":false,"fork":false,"pushed_at":"2014-10-05T16:26:18.000Z","size":120,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-23T11:48:09.133Z","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/stackcss.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2014-10-05T16:20:17.000Z","updated_at":"2014-10-13T22:26:40.000Z","dependencies_parsed_at":"2022-08-21T15:20:57.945Z","dependency_job_id":null,"html_url":"https://github.com/stackcss/sheetify-custom-media","commit_stats":null,"previous_names":["yoshuawuyts/sheetify-custom-media"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackcss%2Fsheetify-custom-media","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackcss%2Fsheetify-custom-media/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackcss%2Fsheetify-custom-media/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackcss%2Fsheetify-custom-media/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stackcss","download_url":"https://codeload.github.com/stackcss/sheetify-custom-media/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243960666,"owners_count":20375105,"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-23T03:17:46.530Z","updated_at":"2025-03-17T02:12:05.302Z","avatar_url":"https://github.com/stackcss.png","language":"JavaScript","readme":"# sheetify-custom-media\n[![NPM version][npm-image]][npm-url]\n[![build status][travis-image]][travis-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n[![Downloads][downloads-image]][downloads-url]\n\nA [sheetify][sheetify-url] transform to add support for\n[W3C-style CSS custom media queries](http://dev.w3.org/csswg/mediaqueries/#custom-mq)\nsyntax. Uses [`rework-custom-media`][rework-custom-media] to perform the transformation.\n\n__N.B.__ This is not a polyfill. This transform aims to provide a future-proof way\nof using a limited subset of the features provided by native CSS custom media\nqueries.\n\n## Installation\n```bash\nnpm install sheetify-custom-media\n```\n\n## Usage\nAs a sheetify transform:\n```js\nvar media = require('sheetify-custom-media');\nvar sheetify = require('sheetify');\n\nsheetify('path/to/my/index.css')\n  .transform(media())\n  .bundle();\n```\n\n## Options\n#### map\nOptionally, you may define the \u003cmedia-query-list\u003e for each \u003cextension-name\u003e\nin a JavaScript object that is passed to the function.\n```js\nvar myQueries = {\n  map: {\n    '--wide-screen': 'screen and (min-width:900px)'\n  }\n}\n\nvariables({map: myQueries});\n```\n\n# CSS syntax\nA custom media query is defined with the `@custom-media` rule. Its scope is\nglobal.\n\n```css\n@custom-media \u003cextension-name\u003e \u003cmedia-query-list\u003e;\n```\n\nThe `\u003cextension-name\u003e` can then be used in a media feature. The alias must be\nwrapped in parentheses.\n\n```css\n@custom-media --narrow-window screen and (max-width: 30em);\n\n@media (--narrow-window) {\n  /* narrow window styles */\n}\n```\n\n## License\n[MIT](https://tldrlegal.com/license/mit-license)\n\n[npm-image]: https://img.shields.io/npm/v/sheetify-custom-media.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/sheetify-custom-media\n[travis-image]: https://img.shields.io/travis/yoshuawuyts/sheetify-custom-media.svg?style=flat-square\n[travis-url]: https://travis-ci.org/yoshuawuyts/sheetify-custom-media\n[coveralls-image]: https://img.shields.io/coveralls/yoshuawuyts/sheetify-custom-media.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/yoshuawuyts/sheetify-custom-media?branch=master\n[downloads-image]: http://img.shields.io/npm/dm/sheetify-custom-media.svg?style=flat-square\n[downloads-url]: https://npmjs.org/package/sheetify-custom-media\n\n[sheetify-url]: https://github.com/requireio/sheetify\n[rework-custom-media]: https://github.com/reworkcss/rework-custom-media\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackcss%2Fsheetify-custom-media","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackcss%2Fsheetify-custom-media","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackcss%2Fsheetify-custom-media/lists"}