{"id":31637625,"url":"https://github.com/ad-si/elm-stylus","last_synced_at":"2026-05-14T23:03:04.367Z","repository":{"id":315963100,"uuid":"1061402514","full_name":"ad-si/elm-stylus","owner":"ad-si","description":"Stylus CSS parser for Elm","archived":false,"fork":false,"pushed_at":"2025-09-21T21:25:51.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-03T19:40:27.604Z","etag":null,"topics":["css","elm","parser","preprocessor","stylus"],"latest_commit_sha":null,"homepage":"","language":"Elm","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ad-si.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["ad-si"],"custom":["https://www.paypal.me/adriansieber"]}},"created_at":"2025-09-21T20:45:38.000Z","updated_at":"2025-09-21T21:25:54.000Z","dependencies_parsed_at":"2025-09-21T22:26:40.826Z","dependency_job_id":"4d15104b-cc8a-45be-9be3-bd6bc53895d2","html_url":"https://github.com/ad-si/elm-stylus","commit_stats":null,"previous_names":["ad-si/elm-stylus"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ad-si/elm-stylus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ad-si%2Felm-stylus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ad-si%2Felm-stylus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ad-si%2Felm-stylus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ad-si%2Felm-stylus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ad-si","download_url":"https://codeload.github.com/ad-si/elm-stylus/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ad-si%2Felm-stylus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278708074,"owners_count":26031932,"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-06T02:00:05.630Z","response_time":65,"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","elm","parser","preprocessor","stylus"],"created_at":"2025-10-07T01:38:29.913Z","updated_at":"2025-10-07T01:38:34.460Z","avatar_url":"https://github.com/ad-si.png","language":"Elm","funding_links":["https://github.com/sponsors/ad-si","https://www.paypal.me/adriansieber"],"categories":[],"sub_categories":[],"readme":"# elm-stylus\n\nA Stylus CSS preprocessor parser for Elm\nthat converts a strict subset of Stylus syntax to CSS.\n\n\n## Installation\n\n```bash\nelm install ad-si/elm-stylus\n```\n\n\n## Usage\n\n```elm\nimport Stylus.Parser exposing (stylusToCss)\n\nstylus : String\nstylus = \"\"\"\ndiv\n  width 400px\n  height 300px\n  background-color blue\n\nh1, h2, h3\n  color red\n  font-size 18px\n\n// This is a comment\n.alert\n  color rgb(255, 0, 0)\n\"\"\"\n\ncss : Result (List (DeadEnd Context Problem)) String\ncss = stylusToCss stylus\n```\n\nThis will produce:\n\n```css\ndiv{width:400px;height:300px;background-color:blue}\nh1,h2,h3{color:red;font-size:18px}\n/*This is a comment*/\n.alert{color:rgb(255,0,0)}\n```\n\n\n## Supported Features\n\n- **Selectors**: Element, class, ID, and attribute selectors\n- **Properties**: Standard CSS properties with values\n- **Comments**: Single-line comments with `//`\n- **Multiple selectors**: Comma-separated selectors\n- **Indentation-based nesting**: Two-space indentation for declarations\n\n\n## Syntax\n\nThe parser supports a strict subset of Stylus syntax:\n\n\n### Basic Rules\n\n```stylus\nselector\n  property value\n  another-property another-value\n```\n\n\n### Multiple Selectors\n\n```stylus\nh1, h2, .important\n  font-weight bold\n  color blue\n```\n\n\n### Comments\n\n```stylus\n// This is a comment\ndiv\n  margin 0\n```\n\n\n## API\n\n`stylusToCss : String -\u003e Result (List (DeadEnd Context Problem)) String`\n\nThe main function that converts Stylus syntax to CSS. Returns a `Result` where:\n- `Ok String` contains the generated CSS\n- `Err (List (DeadEnd Context Problem))` contains parsing errors\n\n**Types**\n\n- `Expression` - AST node types (Rule, Comment, Newlines)\n- `Problem` - Parsing error types\n- Additional parser functions are exposed for advanced use cases\n\n**Development**\n\n```bash\n# Run tests\nmake test\n\n# Install dependencies\nnpm install\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fad-si%2Felm-stylus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fad-si%2Felm-stylus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fad-si%2Felm-stylus/lists"}