{"id":16716316,"url":"https://github.com/gucong3000/postcss-styled","last_synced_at":"2025-04-10T01:10:29.036Z","repository":{"id":45589848,"uuid":"128740777","full_name":"gucong3000/postcss-styled","owner":"gucong3000","description":"PostCSS syntax for parsing styled components","archived":false,"fork":false,"pushed_at":"2020-06-02T13:45:33.000Z","size":54,"stargazers_count":55,"open_issues_count":7,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-02T22:08:29.329Z","etag":null,"topics":["css","css-in-js","postcss","react","styled","syntax"],"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/gucong3000.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":"2018-04-09T08:39:07.000Z","updated_at":"2023-07-31T11:13:09.000Z","dependencies_parsed_at":"2022-08-04T17:15:15.573Z","dependency_job_id":null,"html_url":"https://github.com/gucong3000/postcss-styled","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gucong3000%2Fpostcss-styled","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gucong3000%2Fpostcss-styled/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gucong3000%2Fpostcss-styled/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gucong3000%2Fpostcss-styled/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gucong3000","download_url":"https://codeload.github.com/gucong3000/postcss-styled/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137886,"owners_count":21053775,"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":["css","css-in-js","postcss","react","styled","syntax"],"created_at":"2024-10-12T21:12:55.832Z","updated_at":"2025-04-10T01:10:29.018Z","avatar_url":"https://github.com/gucong3000.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"PostCSS Styled Syntax\n====\n\n[![NPM version](https://img.shields.io/npm/v/postcss-styled.svg?style=flat-square)](https://www.npmjs.com/package/postcss-styled)\n[![Travis](https://img.shields.io/travis/gucong3000/postcss-styled.svg)](https://travis-ci.org/gucong3000/postcss-styled)\n[![Travis](https://img.shields.io/travis/gucong3000/postcss-syntaxes.svg?label=integration)](https://travis-ci.org/gucong3000/postcss-syntaxes)\n[![Codecov](https://img.shields.io/codecov/c/github/gucong3000/postcss-styled.svg)](https://codecov.io/gh/gucong3000/postcss-styled)\n[![David](https://img.shields.io/david/dev/gucong3000/postcss-styled.svg)](https://david-dm.org/gucong3000/postcss-styled?type=dev)\n\n\u003cimg align=\"right\" width=\"95\" height=\"95\"\n\ttitle=\"Philosopher’s stone, logo of PostCSS\"\n\tsrc=\"http://postcss.github.io/postcss/logo.svg\"\u003e\n\n[PostCSS](https://github.com/postcss/postcss) syntax for parsing [styled components](https://github.com/styled-components/styled-components)\n\n## Getting Started\n\nFirst thing's first, install the module:\n\n```\nnpm install postcss-styled --save-dev\n```\n\n## Use Cases\n\n```js\nconst postcss = require('postcss');\nconst stylelint = require('stylelint');\nconst syntax = require('postcss-styled')({\n\t// syntax for parse css blocks (non-required options)\n\tcss: require('postcss-safe-parser'),\n});\npostcss([stylelint({ fix: true })]).process(source, { syntax: syntax }).then(function (result) {\n\t// An alias for the result.css property. Use it with syntaxes that generate non-CSS output.\n\tresult.content\n});\n```\n\ninput:\n```javascript\nimport styled from 'styled-components';\nconst Title = styled.h1`\n\tfont-size:   1.5em;\n\t\ttext-align:  center;\n\tcolor: palevioletred;\n`;\n```\n\noutput:\n```javascript\nimport styled from 'styled-components';\nconst Title = styled.h1`\n\tfont-size: 1.5em;\n\ttext-align: center;\n\tcolor: palevioletred;\n`;\n```\n\n## Advanced Use Cases\n\nSee: [postcss-syntax](https://github.com/gucong3000/postcss-syntax)\n\n## Style Transformations\n\nThe main use case of this plugin is to apply PostCSS transformations to CSS code in template literals.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgucong3000%2Fpostcss-styled","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgucong3000%2Fpostcss-styled","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgucong3000%2Fpostcss-styled/lists"}