{"id":13468511,"url":"https://github.com/styled-components/polished","last_synced_at":"2025-09-09T20:20:39.554Z","repository":{"id":37250457,"uuid":"72754695","full_name":"styled-components/polished","owner":"styled-components","description":"A lightweight toolset for writing styles in JavaScript ✨","archived":false,"fork":false,"pushed_at":"2025-03-13T14:56:36.000Z","size":11409,"stargazers_count":7655,"open_issues_count":25,"forks_count":209,"subscribers_count":40,"default_branch":"main","last_synced_at":"2025-05-01T02:05:31.427Z","etag":null,"topics":["css-in-js","inline-styles","styled-components","styling"],"latest_commit_sha":null,"homepage":"https://polished.js.org/","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/styled-components.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":null,"patreon":null,"open_collective":"polished","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2016-11-03T14:39:21.000Z","updated_at":"2025-04-30T22:51:34.000Z","dependencies_parsed_at":"2023-02-05T02:01:12.556Z","dependency_job_id":"9ba8f859-8aea-4e4b-8c39-e318dd91a7de","html_url":"https://github.com/styled-components/polished","commit_stats":{"total_commits":760,"total_committers":85,"mean_commits":8.941176470588236,"dds":0.5631578947368421,"last_synced_commit":"a7e3deebf0e849a266f332cf9823c59b66a63fe0"},"previous_names":[],"tags_count":88,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/styled-components%2Fpolished","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/styled-components%2Fpolished/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/styled-components%2Fpolished/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/styled-components%2Fpolished/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/styled-components","download_url":"https://codeload.github.com/styled-components/polished/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252300908,"owners_count":21725935,"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-in-js","inline-styles","styled-components","styling"],"created_at":"2024-07-31T15:01:12.598Z","updated_at":"2025-05-05T15:53:08.060Z","avatar_url":"https://github.com/styled-components.png","language":"JavaScript","readme":"\u003ca href=\"https://github.com/styled-components/polished\"\u003e\n  \u003cimg alt=\"polished\" src=\"https://raw.githubusercontent.com/styled-components/brand/master/polished.png\" height=\"150px\" /\u003e\n\u003c/a\u003e\n\u003cbr /\u003e\n\nA lightweight toolset for writing styles in JavaScript. ✨\n\n![Node CI Test](https://github.com/styled-components/polished/workflows/Node%20CI%20Test/badge.svg?branch=main)\n[![codecov](https://codecov.io/gh/styled-components/polished/branch/main/graph/badge.svg)](https://codecov.io/gh/styled-components/polished)\n[![Github All Releases](https://img.shields.io/npm/dm/polished.svg)](https://npmcharts.com/compare/polished)\n\n```sh\nnpm install --save polished\n# or if you're using yarn\nyarn add polished\n```\n\nWant to write styles in JavaScript, but also want Sass-style helper functions and mixins? Need a consistent color palette throughout your app? `✨ polished` is for you!\n\n- **Make your app look great without stress**\n- **Cross framework compatible**: No matter if you're using [`styled-components`](https://github.com/styled-components/styled-components), emotion, jss, aphrodite, radium, or plain inline styles, as long as you're writing your styles in JavaScript you can use polished!\n- **Switching from a pre-processor to styles in JS made easy**\n\n## Docs\n\n**See the full documentation at [polished.js.org](http://polished.js.org/docs)!**\n\n## Usage\n\n`✨ polished` modules are meant to be used as stand-alone imports. You should avoid importing the entire library directly:\n\n`import { clearFix, animation } from 'polished'`\n~`import * as polished from 'polished`~\n~`import polished from 'polished'`~\n\nWhen `✨ polished` modules are imported properly, tree shaking in [webpack](https://webpack.js.org/guides/tree-shaking/) and [Rollup](https://github.com/rollup/rollup#tree-shaking) can be leveraged to reduce your bundle size.\n\n## Browser Support\nAll Evergreen Browsers + IE11\n\nAs of v3.6.X we support `\u003e0.5%, not dead, ie \u003e= 11, not op_mini all` for all our builds.\n\n## Flow Type Definitions\n\n`✨ polished` has first-class [Flow](https://flow.org/) support with zero configuration to assist you in finding type errors while using our modules.\n\n### Ignore ✨ polished source\n\nFlow frequently updates and it is possible that the version you are running may cause you to run into errors coming from the `polished` package in your `node_modules` directory. You can add the following lines to your `.flowconfig` to ignore `polished` in those cases:\n\n```bash\n[ignore]\n.*/node_modules/polished/.*\n```\n\n## TypeScript Definitions\n\n`✨ polished` has [TypeScript](https://www.typescriptlang.org/) definitions to allow the library to be used in any TypeScript project. You will need to set `moduleResolution` to `node` in your `tsconfig.json` in order to use `✨ polished` with TypeScript.\n\n### Babel plugin\n\nYou can optionally also use [`babel-plugin-polished`](https://github.com/styled-components/babel-plugin-polished) to compile the static function calls out and remove the (already tiny) runtime performance impact of using `✨ polished`.\n\n### Object Spread Properties\n\nIn the documentation you will see examples using [object spread properties](https://github.com/tc39/proposal-object-rest-spread) (`{ ...other }`). To enable this syntax in your project add the [`transform-object-rest-spread` plugin](https://www.npmjs.com/package/babel-plugin-transform-object-rest-spread) (or the [`stage-3` preset](https://babeljs.io/docs/plugins/preset-stage-3/) to enable all stage three features) to your Babel configuration.\n\n## Why?\n\nWhen writing styles in JavaScript, many people need Sass-style helper functions to be productive. `✨ polished` brings them to you in a nice, lightweight package tailor-made for styles in JavaScript.\n\nThe main difference with Sass is that it's written in a functional style and all color functions are curried. This means you can compose them together into your own reusable helpers with a `compose` function of your choice:\n\n```JS\nimport { compose } from 'ramda' // Replace with any compose() function of your choice\nimport { lighten, desaturate } from 'polished'\n\n// Create tone() helper\nconst tone = compose(lighten(0.1), desaturate(0.1))\n```\n\n### Why not `package-xyz`?\n\nFirst of all, we didn't find another library that had everything we needed, and we don't care about installing a dozen packages separately.\n\nSpecifically most other packages that provide color functions do so in an object-oriented style, often with a fluent API that's very different from the Sass-style helpers. This means people that aren't very familiar with JavaScript might shy away from using them.\n\n`✨ polished` was made as a standard library for everybody, no matter if they know JS inside out or not.\n\n## Compatibility\n\n✨ polished is **compatible with any library that accepts styles as JS objects**. This includes, but is by far not limited to, `styled-components`, radium, aphrodite, glamor, glamorous, jss and many more!\n\nNo matter if you're using [inline styles or CSS-in-JS](http://mxstbr.blog/2016/11/inline-styles-vs-css-in-js/), polished is for you.\n\n## Contributors\n\nThis project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].\n\u003ca href=\"https://github.com/styled-components/polished/graphs/contributors\"\u003e\u003cimg src=\"https://opencollective.com/polished/contributors.svg?width=890\u0026button=false\" /\u003e\u003c/a\u003e\n\n\n## Backers\n\nThank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/polished#backer)]\n\n\u003ca href=\"https://opencollective.com/polished#backers\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/polished/backers.svg?width=890\"\u003e\u003c/a\u003e\n\n\n## Sponsors\n\nSupport this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/polished#sponsor)]\n\n\u003ca href=\"https://opencollective.com/polished/sponsor/0/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/polished/sponsor/0/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/polished/sponsor/1/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/polished/sponsor/1/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/polished/sponsor/2/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/polished/sponsor/2/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/polished/sponsor/3/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/polished/sponsor/3/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/polished/sponsor/4/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/polished/sponsor/4/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/polished/sponsor/5/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/polished/sponsor/5/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/polished/sponsor/6/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/polished/sponsor/6/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/polished/sponsor/7/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/polished/sponsor/7/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/polished/sponsor/8/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/polished/sponsor/8/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/polished/sponsor/9/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/polished/sponsor/9/avatar.svg\"\u003e\u003c/a\u003e\n\n\n## License\n\nCopyright © 2016-2021 Brian Hough, Maximilian Stoiber, \u0026 Nik Graf. Licensed under the MIT License, see [LICENSE.md](LICENSE.md) for more information!\n\n\u003cimg src=\"https://static.scarf.sh/a.png?x-pxid=121e67af-0b5f-4132-a6e7-6ae63ebeedac\" /\u003e\n","funding_links":["https://opencollective.com/polished"],"categories":["Styling","JavaScript","Libraries"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstyled-components%2Fpolished","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstyled-components%2Fpolished","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstyled-components%2Fpolished/lists"}