{"id":18358795,"url":"https://github.com/uppercod/css-to-object","last_synced_at":"2025-07-30T10:35:44.608Z","repository":{"id":113250630,"uuid":"305192449","full_name":"UpperCod/css-to-object","owner":"UpperCod","description":"A lightweight and non-strict CSS parser based on Regular Expressions that generates a lightweight AST, designed for CSS-in-JS","archived":false,"fork":false,"pushed_at":"2021-03-04T15:22:09.000Z","size":18,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-15T02:46:20.771Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UpperCod.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2020-10-18T20:41:01.000Z","updated_at":"2024-08-14T15:38:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"b8279878-31e8-43bc-a137-5afd4916df6c","html_url":"https://github.com/UpperCod/css-to-object","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"UpperCod/pkg-base","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UpperCod%2Fcss-to-object","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UpperCod%2Fcss-to-object/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UpperCod%2Fcss-to-object/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UpperCod%2Fcss-to-object/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UpperCod","download_url":"https://codeload.github.com/UpperCod/css-to-object/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247488536,"owners_count":20946957,"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-11-05T22:19:26.577Z","updated_at":"2025-04-06T13:31:38.273Z","avatar_url":"https://github.com/UpperCod.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# css-to-object\n\ncss-to-object is a package that transforms the syntax from css to JSON format using regular expressions\n\nThe result is an object that shows properties, selectors and nests, example:\n\n## input css\n\n```css\n.a {\n    width: 200px;\n    .b {\n        font-size: 100px;\n        \u0026:hover {\n            background: teal;\n        }\n    }\n}\n\n@media (max-width: 200px) {\n    .b {\n        font-size: 100px;\n    }\n}\n```\n\n## output css\n\n```json\n{\n    \":host\": {\n        \".a \": {\n            \"width\": \"200px\",\n            \".b \": {\n                \"font-size\": \"100px\",\n                \"\u0026:hover \": { \"background\": \"teal\" }\n            }\n        },\n        \"@media (max-width: 200px) \": { \".b \": { \"font-size\": \"100px\" } }\n    }\n}\n```\n\n\u003e **Note** that the output is encapsulated in a `:host` selector.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuppercod%2Fcss-to-object","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuppercod%2Fcss-to-object","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuppercod%2Fcss-to-object/lists"}