{"id":16349503,"url":"https://github.com/jednano/postcss-nested-props","last_synced_at":"2025-03-21T00:30:36.090Z","repository":{"id":57328283,"uuid":"38865411","full_name":"jednano/postcss-nested-props","owner":"jednano","description":"PostCSS plugin to unwrap nested properties.","archived":false,"fork":false,"pushed_at":"2017-11-02T17:41:27.000Z","size":95,"stargazers_count":57,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T02:48:33.642Z","etag":null,"topics":["css","nested","nested-properties","postcss","postcss-plugin","properties","props","sass"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/jednano.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-07-10T06:41:52.000Z","updated_at":"2025-01-18T20:49:07.000Z","dependencies_parsed_at":"2022-09-18T17:23:01.487Z","dependency_job_id":null,"html_url":"https://github.com/jednano/postcss-nested-props","commit_stats":null,"previous_names":["jedmao/postcss-nested-props"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jednano%2Fpostcss-nested-props","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jednano%2Fpostcss-nested-props/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jednano%2Fpostcss-nested-props/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jednano%2Fpostcss-nested-props/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jednano","download_url":"https://codeload.github.com/jednano/postcss-nested-props/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244717159,"owners_count":20498280,"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","nested","nested-properties","postcss","postcss-plugin","properties","props","sass"],"created_at":"2024-10-11T01:00:03.815Z","updated_at":"2025-03-21T00:30:35.825Z","avatar_url":"https://github.com/jednano.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# postcss-nested-props\n\n\u003cimg align=\"right\" width=\"135\" height=\"95\"\n     title=\"Philosopher’s stone, logo of PostCSS\"\n     src=\"http://postcss.github.io/postcss/logo-leftp.png\"\u003e\n\n[![NPM version](http://img.shields.io/npm/v/postcss-nested-props.svg?style=flat)](https://www.npmjs.org/package/postcss-nested-props)\n[![npm license](http://img.shields.io/npm/l/postcss-nested-props.svg?style=flat-square)](https://www.npmjs.org/package/postcss-nested-props)\n[![Travis Build Status](https://img.shields.io/travis/jedmao/postcss-nested-props.svg)](https://travis-ci.org/jedmao/postcss-nested-props)\n[![codecov](https://codecov.io/gh/jedmao/postcss-nested-props/branch/master/graph/badge.svg)](https://codecov.io/gh/jedmao/postcss-nested-props)\n[![Dependency Status](https://gemnasium.com/badges/github.com/jedmao/postcss-nested-props.svg)](https://gemnasium.com/github.com/jedmao/postcss-nested-props)\n\n[![npm](https://nodei.co/npm/postcss-nested-props.svg?downloads=true)](https://nodei.co/npm/postcss-nested-props/)\n\n[PostCSS](https://github.com/postcss/postcss) plugin to unwrap [nested properties](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#nested_properties).\n\n## Nested Properties\n\nCSS has quite a few properties that are in “namespaces;” for instance, `font-family`, `font-size`, and `font-weight` are all in the `font` namespace. In CSS, if you want to set a bunch of properties in the same namespace, you have to type it out each time. This plugin provides a shortcut: just write the namespace once, then nest each of the sub-properties within it. For example:\n\n```scss\n.funky {\n  font: {\n    family: fantasy;\n    size: 30em;\n    weight: bold;\n  }\n}\n```\n\nis compiled to:\n\n```scss\n.funky {\n  font-family: fantasy;\n  font-size: 30em;\n  font-weight: bold;\n}\n```\n\nThe property namespace itself can also have a value. For example:\n\n```scss\n.funky {\n  font: 20px/24px fantasy {\n    weight: bold;\n  }\n}\n```\n\nis compiled to:\n\n```css\n.funky {\n  font: 20px/24px fantasy;\n  font-weight: bold;\n}\n```\n\nFor nested rules, use the [`postcss-nested`](https://github.com/postcss/postcss-nested) plugin, but make sure to run it _**after**_ this one.\n\n## Installation\n\n```\n$ npm install postcss-nested-props\n```\n\n## Usage\n\n### JavaScript\n\n```js\npostcss([ require('postcss-nested-props') ]);\n```\n\n### TypeScript\n\n```ts\nimport * as postcssNestedProps from 'postcss-nested-props';\n\npostcss([ postcssNestedProps ]);\n```\n\n### Options\n\nNone at this time.\n\n## Testing\n\nRun the following command:\n\n```\n$ npm test\n```\n\nThis will build scripts, run tests and generate a code coverage report. Anything less than 100% coverage will throw an error.\n\n### Watching\n\nFor much faster development cycles, run the following commands in 2 separate processes:\n\n```\n$ npm run build:watch\n```\n\nCompiles TypeScript source into the `./dist` folder and watches for changes.\n\n```\n$ npm run watch\n```\n\nRuns the tests in the `./dist` folder and watches for changes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjednano%2Fpostcss-nested-props","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjednano%2Fpostcss-nested-props","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjednano%2Fpostcss-nested-props/lists"}