{"id":19745006,"url":"https://github.com/awayken/postcss-placeholdit","last_synced_at":"2026-05-13T18:13:49.618Z","repository":{"id":48001413,"uuid":"60481716","full_name":"awayken/postcss-placeholdit","owner":"awayken","description":"PostCSS plugin that uses the placehold.it service as a placeholder for broken background images.","archived":false,"fork":false,"pushed_at":"2023-01-04T01:10:06.000Z","size":522,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-30T03:52:07.397Z","etag":null,"topics":["postcss"],"latest_commit_sha":null,"homepage":"","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/awayken.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":"2016-06-05T21:19:28.000Z","updated_at":"2020-07-30T12:35:18.000Z","dependencies_parsed_at":"2023-02-01T17:01:55.761Z","dependency_job_id":null,"html_url":"https://github.com/awayken/postcss-placeholdit","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/awayken%2Fpostcss-placeholdit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awayken%2Fpostcss-placeholdit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awayken%2Fpostcss-placeholdit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awayken%2Fpostcss-placeholdit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/awayken","download_url":"https://codeload.github.com/awayken/postcss-placeholdit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240917707,"owners_count":19878308,"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":["postcss"],"created_at":"2024-11-12T02:02:01.350Z","updated_at":"2026-05-13T18:13:49.560Z","avatar_url":"https://github.com/awayken.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PostCSS PlaceholdIt [![Build Status][ci-img]][ci]\n\n[PostCSS] plugin that uses the https://placehold.it service as a placeholder for broken background images. You provide the background image you want to use as one parameter, and then provide a placeholder size for the second parameter.\n\n_Note:_ This plugin is a work in progress.\n\n[PostCSS]: https://github.com/postcss/postcss\n[ci-img]:  https://travis-ci.org/awayken/postcss-placeholdit.svg\n[ci]:      https://travis-ci.org/awayken/postcss-placeholdit\n\n```css\n.foo {\n    background-image: placeholdit(\"/brokenimage.jpg\", \"400x400\");\n}\n```\n\nIf the background image exists:\n```css\n.foo {\n    background-image: url(\"/brokenimage.jpg\");\n}\n```\n\nIf the background image doesn't exists:\n```css\n.foo {\n    background-image: url(\"https://placehold.it/400x400\");\n}\n```\n\n## Usage\n\n```js\npostcss([ require('postcss-placeholdit') ])\n```\n\n## Options\n\n### domain\n\nYou can pass a domain option to the plugin so that the plugin knows what absolute URL to use to request your image.\n\nDefault: *http://localhost*\n\n_Note:_ The plugin will only prepend a domain if the background image doesn't have an http or https protocol specified.\n\n```js\npostcss([ required('postcss-placeholdit')({ domain: 'http://example.com' }) ])\n```\n\n```css\n.foo {\n    /* Will request http://example.com/brokenimage.jpg */\n    background-image: placeholdit(\"/brokenimage.jpg\", \"400x400\");\n}\n\n.foo {\n    /* Will request http://example.org/brokenimage.jpg */\n    background-image: placeholdit(\"http://example.org/brokenimage.jpg\", \"400x400\");\n}\n```\n\nSee [PostCSS] docs for examples for your environment.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawayken%2Fpostcss-placeholdit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fawayken%2Fpostcss-placeholdit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawayken%2Fpostcss-placeholdit/lists"}