{"id":15608519,"url":"https://github.com/hypercubed/computed-styles","last_synced_at":"2025-04-28T11:46:05.415Z","repository":{"id":66193236,"uuid":"44310050","full_name":"Hypercubed/computed-styles","owner":"Hypercubed","description":"Get the computed styles of a DOM element in a cross browser consistent manner","archived":false,"fork":false,"pushed_at":"2015-11-16T05:15:25.000Z","size":192,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T16:25:50.865Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hypercubed.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-10-15T10:16:50.000Z","updated_at":"2019-10-05T07:18:36.000Z","dependencies_parsed_at":"2023-02-20T00:00:56.659Z","dependency_job_id":null,"html_url":"https://github.com/Hypercubed/computed-styles","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hypercubed%2Fcomputed-styles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hypercubed%2Fcomputed-styles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hypercubed%2Fcomputed-styles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hypercubed%2Fcomputed-styles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hypercubed","download_url":"https://codeload.github.com/Hypercubed/computed-styles/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251309027,"owners_count":21568732,"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":[],"created_at":"2024-10-03T05:21:14.633Z","updated_at":"2025-04-28T11:46:05.395Z","avatar_url":"https://github.com/Hypercubed.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# computed-style\n\n[![NPM version][npm-image]][npm-url]\n[![Build Status][travis-image]][travis-url]\n[![Downloads][download-badge]][npm-url]\n\n\u003e Get the computed styles of a DOM element in a cross browser consistent manner\n\n## Install\n\n```sh\nnpm install computed-styles\n```\n\n## Usage\n\n### Get computed styles\n\n```js\nimport computedStyles from 'computed-styles';\n\ncomputedStyles(document.querySelector('#node')) // returns computed styles as an object\n```\n\n### Convert computed styles to inline styles\n\n```js\nimport computedStyles from 'computed-styles';\n\nvar node = document.querySelector('#node');\ncomputedStyles(node, node.styles);\n```\n\n### Copy computed styles to another element\n\n```js\nimport computedStyles from 'computed-styles';\n\nvar source = document.querySelector('#source');\nvar target = document.querySelector('#target');\ncomputedStyles(source, target.styles);\n```\n\nSee [API](API.md)\n\n## License\n\nMIT © [J. Harshbarger](http://github.com/Hypercubed)\n\n[npm-url]: https://npmjs.org/package/computed-styles\n[npm-image]: https://img.shields.io/npm/v/computed-styles.svg?style=flat-square\n\n[travis-url]: https://travis-ci.org/Hypercubed/computed-styles\n[travis-image]: https://img.shields.io/travis/Hypercubed/computed-styles.svg?style=flat-square\n\n[download-badge]: http://img.shields.io/npm/dm/computed-styles.svg?style=flat-square\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhypercubed%2Fcomputed-styles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhypercubed%2Fcomputed-styles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhypercubed%2Fcomputed-styles/lists"}