{"id":13434046,"url":"https://github.com/zurb/siphon-media-query","last_synced_at":"2025-04-11T07:30:54.046Z","repository":{"id":57361886,"uuid":"53077089","full_name":"zurb/siphon-media-query","owner":"zurb","description":"Extract media query-specific rules from CSS.","archived":false,"fork":false,"pushed_at":"2016-03-03T19:34:34.000Z","size":3,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-03-25T10:51:10.860Z","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/zurb.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2016-03-03T19:27:58.000Z","updated_at":"2020-04-05T16:37:33.000Z","dependencies_parsed_at":"2022-09-26T16:40:41.881Z","dependency_job_id":null,"html_url":"https://github.com/zurb/siphon-media-query","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurb%2Fsiphon-media-query","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurb%2Fsiphon-media-query/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurb%2Fsiphon-media-query/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurb%2Fsiphon-media-query/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zurb","download_url":"https://codeload.github.com/zurb/siphon-media-query/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248081745,"owners_count":21044751,"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-07-31T02:01:44.033Z","updated_at":"2025-04-11T07:30:53.683Z","avatar_url":"https://github.com/zurb.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# siphon-media-query\n\nExtract media query-specific CSS from a stylesheet. Used by the [Foundation for Emails](http://foundation.zurb.com/emails) web inliner to separate general CSS from media query-specific CSS. Inspired by [media-query-extractor](https://www.npmjs.com/package/media-query-extractor), the main difference being this library works as a pure API.\n\n## Installation\n\n```bash\nnpm install siphon-media-query --save\n```\n\n## Usage\n\nThe parse function takes in a CSS string and gives you back a CSS string.\n\nTo extract all media queries:\n\n```js\nvar parse = require('siphon-media-query');\n\nvar input = `\n  .foo { color: red; }\n\n  @media { .bar { color: dodgerblue; } }\n`;\n\nparse(input); // =\u003e @media { .bar { color: dodgerblue; } }\n```\n\nTo extract only CSS from a specific media query:\n\n```js\nvar input = `\n  @media (min-width: 400px) {\n    .foo { color: red; }\n  }\n\n  @media (min-width: 800px) {\n    .bar { color: dodgerblue; }\n  }\n`;\n\nparse(input, '(min-width: 800px)');\n// =\u003e\n// @media (min-width: 800px) {\n//   .bar { color: dodgerblue; }\n// }\n```\n\n## Local Development\n\n```bash\ngit clone https://github.com/zurb/siphon-media-query\ncd siphon-media-query\nnpm install\nnpm test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzurb%2Fsiphon-media-query","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzurb%2Fsiphon-media-query","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzurb%2Fsiphon-media-query/lists"}