{"id":15769682,"url":"https://github.com/mrcgrtz/postcss-opacity-percentage","last_synced_at":"2025-04-06T20:12:18.930Z","repository":{"id":36951498,"uuid":"425873754","full_name":"mrcgrtz/postcss-opacity-percentage","owner":"mrcgrtz","description":"🌗 PostCSS plugin to transform percentage-based opacity values to more compatible floating-point values.","archived":false,"fork":false,"pushed_at":"2025-03-17T17:52:59.000Z","size":826,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T10:48:01.794Z","etag":null,"topics":["css","css4","opacity","postcss","postcss-plugin"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/postcss-opacity-percentage","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/mrcgrtz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"mrcgrtz","tidelift":null,"community_bridge":null,"liberapay":"mrcgrtz","issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-11-08T14:38:48.000Z","updated_at":"2025-03-17T17:53:01.000Z","dependencies_parsed_at":"2023-02-16T21:45:31.122Z","dependency_job_id":"873dd541-27ba-4fb4-9b11-283939e17608","html_url":"https://github.com/mrcgrtz/postcss-opacity-percentage","commit_stats":{"total_commits":194,"total_committers":4,"mean_commits":48.5,"dds":"0.24226804123711343","last_synced_commit":"e6078ea92c6d5cc04e365c7487bd2bec0ecfd47c"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrcgrtz%2Fpostcss-opacity-percentage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrcgrtz%2Fpostcss-opacity-percentage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrcgrtz%2Fpostcss-opacity-percentage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrcgrtz%2Fpostcss-opacity-percentage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrcgrtz","download_url":"https://codeload.github.com/mrcgrtz/postcss-opacity-percentage/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247543593,"owners_count":20955865,"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","css4","opacity","postcss","postcss-plugin"],"created_at":"2024-10-04T14:04:02.014Z","updated_at":"2025-04-06T20:12:18.903Z","avatar_url":"https://github.com/mrcgrtz.png","language":"JavaScript","funding_links":["https://ko-fi.com/mrcgrtz","https://liberapay.com/mrcgrtz"],"categories":[],"sub_categories":[],"readme":"# PostCSS Opacity Percentage\n\n[![Test](https://github.com/mrcgrtz/postcss-opacity-percentage/actions/workflows/test.yml/badge.svg)](https://github.com/mrcgrtz/postcss-opacity-percentage/actions/workflows/test.yml)\n[![Coverage Status](https://coveralls.io/repos/github/mrcgrtz/postcss-opacity-percentage/badge.svg?branch=main)](https://coveralls.io/github/mrcgrtz/postcss-opacity-percentage?branch=main)\n[![Install size](https://packagephobia.now.sh/badge?p=postcss-opacity-percentage)](https://packagephobia.now.sh/result?p=postcss-opacity-percentage)\n[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)\n[![MIT license](https://img.shields.io/github/license/mrcgrtz/postcss-opacity-percentage.svg)](https://github.com/mrcgrtz/postcss-opacity-percentage/blob/main/LICENSE.md)\n\n[PostCSS](https://github.com/postcss/postcss) plugin to transform [percentage-based opacity values](https://www.w3.org/TR/css-color-4/#transparency) to more compatible floating-point values.\n\n## Install\n\nUsing [npm](https://www.npmjs.com/get-npm):\n\n```bash\nnpm install --save-dev postcss postcss-opacity-percentage\n```\n\nUsing [yarn](https://yarnpkg.com/):\n\n```bash\nyarn add --dev postcss postcss-opacity-percentage\n```\n\n## Example\n\n```css\n/* Input */\n.foo {\n  opacity: 45%;\n}\n```\n\n```css\n/* Output */\n.foo {\n  opacity: 0.45;\n}\n```\n\n## Usage\n\n```js\npostcss([\n  require('postcss-opacity-percentage'),\n]);\n```\n\nSee [PostCSS](https://github.com/postcss/postcss) documentation for examples for your environment.\n\n### `postcss-preset-env`\n\nIf you are using [`postcss-preset-env@\u003e=7.3.0`](https://github.com/csstools/postcss-plugins/blob/main/plugin-packs/postcss-preset-env/CHANGELOG.md#730-january-31-2022), you already have this plugin installed via this package.\n\n## Options\n\n### `preserve`\n\nThe `preserve` option determines whether the original percentage value is preserved. By default, it is not preserved.\n\n```js\n// Keep the original notation\npostcss([\n  require('postcss-opacity-percentage')({preserve: true}),\n]);\n```\n\n```css\n/* Input */\n.foo {\n  opacity: 45%;\n}\n```\n\n```css\n/* Output */\n.foo {\n  opacity: 0.45;\n  opacity: 45%;\n}\n```\n\n## License\n\nMIT © [Marc Görtz](https://marcgoertz.de/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrcgrtz%2Fpostcss-opacity-percentage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrcgrtz%2Fpostcss-opacity-percentage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrcgrtz%2Fpostcss-opacity-percentage/lists"}