{"id":15502905,"url":"https://github.com/johno/mqify","last_synced_at":"2025-04-22T23:20:40.422Z","repository":{"id":26684493,"uuid":"109529454","full_name":"johno/mqify","owner":"johno","description":"Turn a css string and media query config into classes for each breakpoint","archived":false,"fork":false,"pushed_at":"2022-11-10T15:22:42.000Z","size":459,"stargazers_count":10,"open_issues_count":9,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-20T02:18:45.853Z","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/johno.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":"2017-11-04T20:54:15.000Z","updated_at":"2023-04-06T14:57:01.000Z","dependencies_parsed_at":"2023-01-14T05:09:21.779Z","dependency_job_id":null,"html_url":"https://github.com/johno/mqify","commit_stats":null,"previous_names":["johnotander/mqify"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johno%2Fmqify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johno%2Fmqify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johno%2Fmqify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johno%2Fmqify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johno","download_url":"https://codeload.github.com/johno/mqify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250338415,"owners_count":21414173,"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-10-02T09:11:31.997Z","updated_at":"2025-04-22T23:20:40.399Z","avatar_url":"https://github.com/johno.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mqify [![Build Status](https://secure.travis-ci.org/johno/mqify.svg?branch=master)](https://travis-ci.org/johno/mqify) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)\n\nTurn a css string and media query config into classes for each breakpoint\n\n## Installation\n\n```bash\nnpm install --save mqify\n```\n\n## Usage\n\n```javascript\nvar mqify = require('mqify')\n\nmqify(CSS, [24, 32, 46])\n```\n\n#### Input\n\n```css\n.fl { float: left }\n```\n\n#### Output\n\n```css\n.fl { float: left }\n\n@media screen and (min-width: 24em) and (max-width: 32em) {\n  .fl-md { float: left }\n}\n\n@media screen and (min-width: 32em) and (max-width: 64em) {\n  .fl-lg { float: left }\n}\n\n@media screen and (min-width: 64em) {\n  .fl-xl { float: left }\n}\n```\n\n#### Options\n\nIn addition to a breakpoint array, `mqify` accepts a key/value pair or a more complex config.\n\n##### Key/value pair\n\n```js\n[\n  { medium: 24 },\n  { large: 48 }\n]\n```\n\n##### All the options\n\n```js\n[\n  {\n    med: {\n      value: 32,\n      prefix: true,\n      delimiter: '-',\n      minWidth: true\n    }\n  }\n]\n```\n\n##### Print query\n\n`mqify` can also construct the `@media print` query:\n\n```js\n[\n  // Pass a 'print' string\n  'print',\n  // Or a breakpoint named 'print'\n  { print: true }\n  // Or a breakpoint named 'print'. Its value will be the query identifier\n  { print: 'p'}\n]\n```\n\n## License\n\nMIT\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\nCrafted with \u003c3 by John Otander ([@4lpine](https://twitter.com/4lpine)).\n\n***\n\n\u003e This package was initially generated with [yeoman](http://yeoman.io) and the [p generator](https://github.com/johnotander/generator-p.git).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohno%2Fmqify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohno%2Fmqify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohno%2Fmqify/lists"}