{"id":17948839,"url":"https://github.com/meomix/postcss-inline-trait","last_synced_at":"2026-01-20T07:32:53.588Z","repository":{"id":57328140,"uuid":"52068660","full_name":"MeoMix/postcss-inline-trait","owner":"MeoMix","description":null,"archived":false,"fork":false,"pushed_at":"2017-05-07T11:43:08.000Z","size":23,"stargazers_count":0,"open_issues_count":51,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T13:11:23.920Z","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/MeoMix.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-02-19T07:08:25.000Z","updated_at":"2016-02-19T07:11:02.000Z","dependencies_parsed_at":"2022-08-23T14:41:00.202Z","dependency_job_id":null,"html_url":"https://github.com/MeoMix/postcss-inline-trait","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/MeoMix%2Fpostcss-inline-trait","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeoMix%2Fpostcss-inline-trait/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeoMix%2Fpostcss-inline-trait/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeoMix%2Fpostcss-inline-trait/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MeoMix","download_url":"https://codeload.github.com/MeoMix/postcss-inline-trait/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247811412,"owners_count":21000105,"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-29T09:10:17.958Z","updated_at":"2026-01-20T07:32:53.561Z","avatar_url":"https://github.com/MeoMix.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PostCSS Inline Trait [![Build Status][ci-img]][ci]\n\n[PostCSS] plugin which allows for inline declaration of CSS properties whose values will be imported from a traits directory..\n\n[PostCSS]: https://github.com/postcss/postcss\n[ci-img]:  https://travis-ci.org/MeoMix/postcss-inline-trait.svg\n[ci]:      https://travis-ci.org/MeoMix/postcss-inline-trait\n\nConverts:\n```css\n.foo {\n    /* .css file-ending is optional */\n    /* path is assumed to be ./common/css/traits/fancy.trait */\n    trait: superFancy from 'fancy.trait';\n}\n\n/* fancy.css */\n.superFancy {\n    background-color: 'pink';\n}\n```\n\ninto:\n```css\n.foo {\n  background-color: 'pink';\n}\n```\n\n## Usage\n\n```js\nvar inlineTrait = require('postcss-inline-trait');\npostcss([inlineTrait({\n    getFileText: function(path){\n        // return environment-specific means of retrieving text at path such as Node's fs.readFile or SystemJS fetch\n        // e.g:\n        return System.normalize(path).then(System.import.bind(System));\n    }\n})])\n```\n\nSee [PostCSS] docs for examples for your environment.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeomix%2Fpostcss-inline-trait","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeomix%2Fpostcss-inline-trait","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeomix%2Fpostcss-inline-trait/lists"}