{"id":13826331,"url":"https://github.com/unlight/postcss-import-url","last_synced_at":"2025-08-20T03:31:20.241Z","repository":{"id":55882157,"uuid":"45316164","full_name":"unlight/postcss-import-url","owner":"unlight","description":"PostCSS plugin inlines remote files.","archived":false,"fork":false,"pushed_at":"2023-05-06T23:05:15.000Z","size":180,"stargazers_count":50,"open_issues_count":4,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-08T15:25:13.209Z","etag":null,"topics":["postcss","postcss-plugin"],"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/unlight.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-10-31T19:58:08.000Z","updated_at":"2024-07-14T22:46:12.000Z","dependencies_parsed_at":"2024-01-18T04:08:17.798Z","dependency_job_id":"1ed81da3-4071-4b16-b7f3-0ba0fc4f5b9b","html_url":"https://github.com/unlight/postcss-import-url","commit_stats":{"total_commits":78,"total_committers":14,"mean_commits":5.571428571428571,"dds":"0.46153846153846156","last_synced_commit":"9f2cb7941c18e9ce348ef9be47499ef67339ccee"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unlight%2Fpostcss-import-url","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unlight%2Fpostcss-import-url/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unlight%2Fpostcss-import-url/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unlight%2Fpostcss-import-url/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unlight","download_url":"https://codeload.github.com/unlight/postcss-import-url/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230388131,"owners_count":18217755,"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","postcss-plugin"],"created_at":"2024-08-04T09:01:35.765Z","updated_at":"2024-12-19T06:09:39.895Z","avatar_url":"https://github.com/unlight.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# postcss-import-url\n\n[PostCSS](https://github.com/postcss/postcss) plugin inlines remote files.\n\n```css\n/* Input example */\n@import 'https://fonts.googleapis.com/css?family=Tangerine';\nbody {\n  font-size: 13px;\n}\n```\n\n```css\n/* Output example */\n@font-face {\n  font-family: 'Tangerine';\n  font-style: normal;\n  font-weight: 400;\n  src: url(https://fonts.gstatic.com/s/tangerine/v12/IurY6Y5j_oScZZow4VOxCZZM.woff2)\n    format('woff2');\n}\nbody {\n  font-size: 13px;\n}\n```\n\n## Usage\n\n```js\nconst importUrl = require('postcss-import-url');\nconst options = {};\npostcss([importUrl(options)]).process(css, {\n  // Define a `from` option to resolve relative @imports in the initial css to a url.\n  from: 'https://example.com/styles.css',\n});\n```\n\nSee [PostCSS](https://github.com/postcss/postcss#usage) docs for examples for your environment.\n\n## Options\n\n- `recursive` (boolean) To import URLs recursively (default: `true`)\n- `resolveUrls` (boolean) To transform relative URLs found in remote stylesheets into fully qualified URLs ([see #18](https://github.com/unlight/postcss-import-url/pull/18)) (default: `false`)\n- `modernBrowser` (boolean) Set user-agent string to 'Mozilla/5.0 AppleWebKit/537.36 Chrome/80.0.0.0 Safari/537.36', this option maybe useful for importing fonts from Google. Google check `user-agent` header string and respond can be different (default: `false`)\n- `userAgent` (string) Custom user-agent header (default: `null`)\n- `dataUrls` (boolean) Store fetched CSS as base64 encoded data URLs (default: `false`)\n\n## Known Issues\n\n- Google fonts returns different file types per the user agent. Because postcss runs in a shell,\n  Google returns truetype fonts rather than the better woff2 format.\n  Use option `modernBrowser` to explicitly load woff2 fonts.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funlight%2Fpostcss-import-url","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funlight%2Fpostcss-import-url","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funlight%2Fpostcss-import-url/lists"}