{"id":15493831,"url":"https://github.com/peter554/cssutils","last_synced_at":"2025-10-13T11:05:49.848Z","repository":{"id":57135898,"uuid":"274650902","full_name":"Peter554/cssutils","owner":"Peter554","description":"CSS utility class generator","archived":false,"fork":false,"pushed_at":"2021-06-21T05:26:58.000Z","size":169,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-13T11:05:47.296Z","etag":null,"topics":["css","design-tokens","funcional-css","responsive","utility-classes","utility-first"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@peter554/cssutils","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/Peter554.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":"2020-06-24T11:22:18.000Z","updated_at":"2023-11-13T05:42:03.000Z","dependencies_parsed_at":"2022-09-03T11:42:31.338Z","dependency_job_id":null,"html_url":"https://github.com/Peter554/cssutils","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Peter554/cssutils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peter554%2Fcssutils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peter554%2Fcssutils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peter554%2Fcssutils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peter554%2Fcssutils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Peter554","download_url":"https://codeload.github.com/Peter554/cssutils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peter554%2Fcssutils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014749,"owners_count":26085593,"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-13T02:00:06.723Z","response_time":61,"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":["css","design-tokens","funcional-css","responsive","utility-classes","utility-first"],"created_at":"2024-10-02T08:09:34.873Z","updated_at":"2025-10-13T11:05:49.802Z","avatar_url":"https://github.com/Peter554.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cssutils\n\n![CI](https://github.com/Peter554/cssutils/workflows/CI/badge.svg)\n\n`npm install --save-dev @peter554/cssutils`\n\nA CSS utility class generator. User friendly, simple, powerful. Inspired by [tailwindcss](https://github.com/tailwindcss/tailwindcss) and [gordon](https://github.com/hankchizljaw/goron).\n\n## Usage\n\n- `cssutils --help` (CLI)\n- `const cssutils = require(\"@peter554/cssutils\")` (API)\n- Check out the tests for the full features.\n\n### CSS variables\n\n- `cssutils variables --config ./config.yml`\n- `cssutils.variables(config)`\n\n```yml\nvariables:\n  color:\n    red: '#f00'\n    green: '#0f0'\n    grey:\n      light: '#eee'\n      mid: '#999'\n```\n\n```css\n:root { --color-green: #0f0; }\n:root { --color-grey-light: #eee; }\n:root { --color-grey-mid: #999; }\n:root { --color-red: #f00; }\n```\n\n### SASS/SCSS variables\n\n- `cssutils sassvariables --config ./config.yml`\n- `cssutils.sassVariables({configPath: \"./config.yml\"})`\n\n```yml\nvariables:\n  color:\n    red: '#f00'\n    green: '#0f0'\n    grey:\n      light: '#eee'\n      mid: '#999'\n```\n\n```scss\n$color-green: #0f0;\n$color-grey-light: #eee;\n$color-grey-mid: #999;\n$color-red: #f00;\n```\n\n### Utility classes\n\n- `cssutils utilities --config ./config.yml`\n- `cssutils.utilities({configPath: \"./config.yml\"})`\n\n```yml\nvariables:\n  color:\n    red: '#f00'\n    green: '#0f0'\nutilities:\n  background-color:\n    alias: bgclr\n    from: color\n  padding:\n    alias: p\n    from:\n      0: 0\n      1: 0.25rem\n```\n\n```css\n.bgclr-green { background-color: #0f0; }\n.bgclr-red { background-color: #f00; }\n\n.p-0 { padding: 0; }\n.p-1 { padding: 0.25rem; }\n```\n\n#### Responsive utility classes\n\n```yml\nutilities:\n  background-color:\n    alias: bgclr\n    from:\n      red: '#f00'\n    breakpoints: [md, lg]\nbreakpoints:\n  md: 800px\n  lg: 1200px\n  xl: 1600px\n```\n\n```css\n.bgclr-red { background-color: #f00; }\n@media (min-width: 800px) { .md\\:bgclr-red { background-color: #f00; } }\n@media (min-width: 1200px) { .lg\\:bgclr-red { background-color: #f00; } }\n```\n\n#### Pseudo utility classes\n\n```yml\nutilities:\n  background-color:\n    alias: bgclr\n    from:\n      red: '#f00'\n    pseudo: [hcs]\npseudo:\n  hcs: [hover, focus]\n  act: [active]\n```\n\n```css\n.bgclr-red { background-color: #f00; }\n.hcs\\:bgclr-red:hover { background-color: #f00; }\n.hcs\\:bgclr-red:focus { background-color: #f00; }\n```\n\n#### Rotations\n\n```yml\nutilities:\n  padding:\n    alias: pad\n    from:\n      1: 0.25rem\n    rotations: true\n```\n\n```css\n.pad-1 { padding: 0.25rem; }\n.pad-b-1 { padding-bottom: 0.25rem; }\n.pad-l-1 { padding-left: 0.25rem; }\n.pad-r-1 { padding-right: 0.25rem; }\n.pad-t-1 { padding-top: 0.25rem; }\n.pad-x-1 { padding-left: 0.25rem; padding-right: 0.25rem; }\n.pad-y-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter554%2Fcssutils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeter554%2Fcssutils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter554%2Fcssutils/lists"}