{"id":16690653,"url":"https://github.com/jonkemp/css-property","last_synced_at":"2026-01-16T00:59:05.006Z","repository":{"id":26087364,"uuid":"29531359","full_name":"jonkemp/css-property","owner":"jonkemp","description":"CSS property constructor","archived":false,"fork":false,"pushed_at":"2020-10-08T22:27:45.000Z","size":148,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-08T20:32:18.021Z","etag":null,"topics":["inline-css"],"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/jonkemp.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":"2015-01-20T13:36:43.000Z","updated_at":"2023-08-24T03:09:03.000Z","dependencies_parsed_at":"2022-09-01T08:11:59.924Z","dependency_job_id":null,"html_url":"https://github.com/jonkemp/css-property","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonkemp%2Fcss-property","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonkemp%2Fcss-property/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonkemp%2Fcss-property/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonkemp%2Fcss-property/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonkemp","download_url":"https://codeload.github.com/jonkemp/css-property/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246952273,"owners_count":20859811,"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":["inline-css"],"created_at":"2024-10-12T16:04:40.843Z","updated_at":"2026-01-16T00:59:04.964Z","avatar_url":"https://github.com/jonkemp.png","language":"JavaScript","readme":"# css-property [![Build Status](https://travis-ci.org/jonkemp/css-property.svg?branch=master)](https://travis-ci.org/jonkemp/css-property) [![Coverage Status](https://coveralls.io/repos/jonkemp/css-property/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/jonkemp/css-property?branch=master)\n\n[![NPM](https://nodei.co/npm/css-property.png?downloads=true)](https://nodei.co/npm/css-property/)\n\n\u003e CSS property constructor\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/css-property)\n\n```\nnpm install --save css-property\n```\n\n## Usage v2\n\n```js\nvar selector = require('style-selector'),\n    property = require('css-property'),\n    bodySelector = selector('body'),\n    prop = property('font-family', 'Arial', bodySelector);\n\nconsole.log(prop.prop);             // font-family\nconsole.log(prop.value);            // Arial\nconsole.log(prop.selector.text);    // body\nconsole.log(prop.toString());       // font-family: Arial;\n```\n\n## Usage v1\n\n```js\nvar Selector = require('style-selector'),\n    Property = require('css-property'),\n    bodySelector = new Selector('body'),\n    prop = new Property('font-family', 'Arial', bodySelector);\n\nconsole.log(prop.prop);             // font-family\nconsole.log(prop.value);            // Arial\nconsole.log(prop.selector.text);    // body\nconsole.log(prop.toString());       // font-family: Arial;\n```\n\n## v2 API\n\n### property(prop, value, selector)\n\n#### prop\n\nType: `String`  \nDefault: `none`\n\nProperty\n\n#### value\n\nType: `String`  \nDefault: `none`\n\nValue\n\n#### selector\n\nType: `Object`  \nDefault: `none`\n\nSelector the property originates from.\n\n### property.compare(property)\n\nCompares with another Property based on Selector#specificity.\n\n#### property\n\nType: `Object`  \nDefault: `none`\n\nProperty to compare.\n\n#### property.toString()\n\nReturns CSS property.\n\n## v1 API\n\n### Property(prop, value, selector)\n\n#### prop\n\nType: `String`  \nDefault: `none`\n\nProperty\n\n#### value\n\nType: `String`  \nDefault: `none`\n\nValue\n\n#### selector\n\nType: `Object`  \nDefault: `none`\n\nSelector the property originates from.\n\n### Property.prototype.compare(property)\n\nCompares with another Property based on Selector#specificity.\n\n#### property\n\nType: `Object`  \nDefault: `none`\n\nProperty to compare.\n\n#### Property.prototype.toString()\n\nReturns CSS property.\n\n## Credit\n\nThe code for this module was originally taken from the [Juice](https://github.com/Automattic/juice) library.\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonkemp%2Fcss-property","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonkemp%2Fcss-property","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonkemp%2Fcss-property/lists"}