{"id":18888217,"url":"https://github.com/juandac/get-custom-properties","last_synced_at":"2026-07-01T02:31:50.411Z","repository":{"id":57250112,"uuid":"428921000","full_name":"JuanDAC/get-custom-properties","owner":"JuanDAC","description":null,"archived":false,"fork":false,"pushed_at":"2021-11-20T14:29:10.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-08T21:07:31.457Z","etag":null,"topics":[],"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/JuanDAC.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":"2021-11-17T05:33:25.000Z","updated_at":"2022-09-21T12:30:11.000Z","dependencies_parsed_at":"2022-08-24T16:51:55.171Z","dependency_job_id":null,"html_url":"https://github.com/JuanDAC/get-custom-properties","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JuanDAC/get-custom-properties","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuanDAC%2Fget-custom-properties","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuanDAC%2Fget-custom-properties/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuanDAC%2Fget-custom-properties/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuanDAC%2Fget-custom-properties/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JuanDAC","download_url":"https://codeload.github.com/JuanDAC/get-custom-properties/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuanDAC%2Fget-custom-properties/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281969171,"owners_count":26591718,"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-10-31T02:00:07.401Z","response_time":57,"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":[],"created_at":"2024-11-08T07:42:50.575Z","updated_at":"2025-10-31T09:47:30.280Z","avatar_url":"https://github.com/JuanDAC.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm version](https://badge.fury.io/js/angular2-expandable-list.svg)](https://badge.fury.io/js/angular2-expandable-list)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)\n\n# Get Custom Properties\n\n\u003e The library get custom properties from selector that you defined in your styles\n\n## Table of contents\n\n- [Project Name](#project-name)\n  - [Table of contents](#table-of-contents)\n  - [Getting Started](#getting-started)\n  - [Installation](#installation)\n  - [Usage](#usage)\n  - [Contributing](#contributing)\n  - [Versioning](#versioning)\n  - [Authors](#authors)\n  - [License](#license)\n\n## Getting Started\n\nBring the custom properties defined by the selectors in the css styles or properties that you defined in the styles element inside the html document.\n\n## Installation\n\n**BEFORE YOU INSTALL:** please read the [prerequisites](#prerequisites)\n\nTo install and set up the library, run:\n\n```sh\n$ npm install get-custom-properties\n```\n\nOr if you prefer using Yarn:\n\n```sh\n$ yarn add get-custom-properties\n```\n\n## Usage\n\n### from rule\n\ncustom properties from selector rule\n\nExample:\n\n`in CSS file`\n\n```css\n:root {\n  --color-primary-600: #a33c3b;\n  --color-primary-400: #f0706e;\n  --color-primary-200: #ff918f;\n  --custom-without-value: ;\n}\n```\n\n`in JS file`\n\n```mjs\nimport { getCustomProperties } from \"get-custom-properties\";\n\nconsole.log(getCustomProperties(\":root\"));\n// ['--color-primary-600', '--color-primary-400', '--color-primary-200', '--custom-without-value']\n```\n\n### from properties registered\n\ncustom properties from registered in `\u003cstyle\u003e` label\n\nExample:\n\n`in HTML file`\n\n```html\n\u003cstyle id=\"customs-registers\"\u003e\n  @property --my-color {\n    syntax: \u003ccolor\u003e;\n    inherits: false;\n    initialvalue: #c0ffee;\n  }\n\n  @property --my-othe-color {\n    syntax: \u003ccolor\u003e;\n    inherits: false;\n    initialvalue: #570705;\n  }\n\u003c/style\u003e\n```\n\n`in JS file`\n\n```mjs\nimport { getCustomPropertiesRegisted } from \"get-custom-properties\";\n\nconsole.log(getCustomPropertiesRegisted(\"#customs-registers\"));\n/* \n  [\n    {\n      name: \"--my-color\",\n      syntax: \"\u003ccolor\u003e\",\n      initialValue: \"#c0ffee\",\n      inherits: false\n    },  \n    {\n      name: \"--my-other-color\",\n      syntax: \"\u003ccolor\u003e\",\n      initialValue: \"#570705\",\n      inherits: false\n    },  \n  ] \n  */\n```\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.\n\n1.  Fork it!\n2.  Create your feature branch: `git checkout -b my-new-feature`\n3.  Add your changes: `git add .`\n4.  Commit your changes: `git commit -am 'Add some feature'`\n5.  Push to the branch: `git push origin my-new-feature`\n6.  Submit a pull request :sunglasses:\n\n## Versioning\n\nWe use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/JuanDAC/get-custom-properties/tags).\n\n## Authors\n\n\u003cdetails  style=\"user-select: none;\"\u003e\n\t\u003csummary\u003e\n\t\t\u003cstrong style=\"user-select: none;cursor: pointer;\"\u003eJuan David Avila\u003c/strong\u003e - \u003ca href=\"https://github.com/JuanDAC\" target=\"_blank\"\u003eJuanDAC\u003c/a\u003e\n\t\u003c/summary\u003e\n\t\u003cimg align=\"center\" src=\"https://github-readme-stats.vercel.app/api/top-langs/?username=JuanDAC\u0026layout=compact\u0026theme=vue\u0026langs_count=6\" alt=\"adri-er github stats\"/\u003e\n\u003c/details\u003e\n\n\u003cbr/\u003e\n\nSee also the list of [contributors](https://github.com/JuanDAC/get-custom-properties/contributors) who participated in this project.\n\n## License\n\n[MIT License](https://andreasonny.mit-license.org/2019)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuandac%2Fget-custom-properties","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuandac%2Fget-custom-properties","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuandac%2Fget-custom-properties/lists"}