{"id":19635603,"url":"https://github.com/2createstudio/postcss-lazy-rules","last_synced_at":"2025-02-26T21:42:06.790Z","repository":{"id":73571451,"uuid":"88868556","full_name":"2createStudio/postcss-lazy-rules","owner":"2createStudio","description":"Generates CSS rules for your images","archived":false,"fork":false,"pushed_at":"2018-10-01T09:05:35.000Z","size":6,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-01-09T16:35:16.434Z","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/2createStudio.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-20T13:27:36.000Z","updated_at":"2018-10-01T09:05:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"78f61dc5-bd40-47ca-8864-c24f7100a25b","html_url":"https://github.com/2createStudio/postcss-lazy-rules","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2createStudio%2Fpostcss-lazy-rules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2createStudio%2Fpostcss-lazy-rules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2createStudio%2Fpostcss-lazy-rules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2createStudio%2Fpostcss-lazy-rules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/2createStudio","download_url":"https://codeload.github.com/2createStudio/postcss-lazy-rules/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240941484,"owners_count":19882062,"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-11T12:26:00.668Z","updated_at":"2025-02-26T21:42:06.763Z","avatar_url":"https://github.com/2createStudio.png","language":"JavaScript","readme":"# postcss-lazy-rules\n\n### Usage\n\n```js\nvar fs = require('fs');\nvar path = require('path');\nvar postcss = require('postcss');\nvar rules = require('postcss-lazy-rules');\n\nvar css = fs.readFileSync('./css/sprite.css', 'utf8');\nvar opts = {\n\timages: path.resolve(__dirname, './images/*.png'),\n\tstylesheet: path.resolve(__dirname, './css/sprite.css')\n};\n\npostcss([rules(opts)])\n\t.process(css, {\n\t\tfrom: './css/style.css',\n\t\tto: './dist/style.css'\n\t})\n\t.then(function(result) {\n\t\tfs.writeFileSync('./dist/style.css', result.css);\n\t});\n```\n\n**Result**\n\n```css\n/* Input */\n\n/* ---------------- */\n\n/* Output */\n.circle { background: url(../images/circle.png) no-repeat 0 0; width: 25px; height: 25px; }\n.square { background: url(../images/square.png) no-repeat 0 0; width: 25px; height: 25px; }\n\n@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {\n\t.circle { background: url(../images/circle@2x.png) no-repeat 0 0; width: 25px; height: 25px; background-size: 25px 25px; }\n\t.square { background: url(../images/square@2x.png) no-repeat 0 0; width: 25px; height: 25px; background-size: 25px 25px; }\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2createstudio%2Fpostcss-lazy-rules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F2createstudio%2Fpostcss-lazy-rules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2createstudio%2Fpostcss-lazy-rules/lists"}