{"id":24568560,"url":"https://github.com/unsass/css","last_synced_at":"2025-08-29T03:33:26.111Z","repository":{"id":36968399,"uuid":"464959026","full_name":"unsass/css","owner":"unsass","description":"Sass mixins to manage CSS declarations.","archived":false,"fork":false,"pushed_at":"2025-08-01T06:12:40.000Z","size":1404,"stargazers_count":1,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-08T23:49:47.183Z","etag":null,"topics":["css","custom-properties","declaration","sass"],"latest_commit_sha":null,"homepage":"https://main.d2q97n2mx9hy2z.amplifyapp.com/guide/css/getting-started.html","language":"SCSS","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/unsass.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"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,"zenodo":null}},"created_at":"2022-03-01T15:54:13.000Z","updated_at":"2025-06-12T23:23:59.000Z","dependencies_parsed_at":"2025-05-02T10:33:14.554Z","dependency_job_id":"45c61bde-502e-4ad1-9f96-f0d3c6fc8d38","html_url":"https://github.com/unsass/css","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/unsass/css","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unsass%2Fcss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unsass%2Fcss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unsass%2Fcss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unsass%2Fcss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unsass","download_url":"https://codeload.github.com/unsass/css/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unsass%2Fcss/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272619474,"owners_count":24965416,"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","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","custom-properties","declaration","sass"],"created_at":"2025-01-23T14:40:48.151Z","updated_at":"2025-08-29T03:33:26.042Z","avatar_url":"https://github.com/unsass.png","language":"SCSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CSS\n\n[![Version](https://flat.badgen.net/npm/v/@unsass/css)](https://www.npmjs.com/package/@unsass/css)\n[![Downloads](https://flat.badgen.net/npm/dt/@unsass/css)](https://www.npmjs.com/package/@unsass/css)\n[![License](https://flat.badgen.net/npm/license/@unsass/css)](https://www.npmjs.com/package/@unsass/css)\n\n## Introduction\n\nSass mixins to manage CSS declarations with custom properties option.\n\n## Installing\n\n```shell\nnpm install @unsass/css\n```\n\n## Usage\n\n```scss\n@use \"@unsass/css\";\n\n.foo {\n    @include css.declaration(color, darkcyan);\n}\n```\n\n## API\n\n### Sass mixins\n\n| Mixin                                        | Description                                           |\n|----------------------------------------------|-------------------------------------------------------|\n| `declaration($property, $value, $important)` | Sets new CSS declaration, with optional `!important`. |\n\n#### Add a new declaration with `css.declaration()`\n\nThe following Sass...\n\n```scss\n@use \"@unsass/css\";\n\n.foo {\n    @include css.declaration(color, darkcyan); // Standard declaration.\n    @include css.declaration(font-size, 16px, true); // Declaration with `!important`.\n    @include css.declaration(box-shadow, (0 0 10px 5px rgba(darkcyan, 0.75), inset 0 0 10px 5px rgba(darkcyan, 0.75))); // Use parentheses for declare comma-separated values list.\n}\n```\n\n...will produce the following CSS...\n\n```css\n.foo {\n    color: darkcyan;\n    font-size: 16px !important;\n    box-shadow: 0 0 10px 5px rgba(darkcyan, 0.75), inset 0 0 10px 5px rgba(darkcyan, 0.75);\n}\n```\n\n#### Add a custom property declaration with `css.declaration()`\n\nThe following Sass...\n\n```scss\n@use \"@unsass/css\";\n@use \"@unsass/css/custom-porperties\";\n\n.foo {\n    @include css.declaration(custom-properties.create(--foo, darkcyan));\n    @include css.declaration(color, custom-properties.create(--foo, darkcyan));\n    @include css.declaration(color, custom-properties.create(--foo, custom-properties.create(--bar, darkcyan)));\n}\n```\n\n...will produce the following CSS...\n\n```css\n.foo {\n    --foo: darkcyan;\n    color: var(--foo, darkcyan);\n    color: var(--foo, var(--bar, darkcyan));\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funsass%2Fcss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funsass%2Fcss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funsass%2Fcss/lists"}