{"id":15395045,"url":"https://github.com/goto-bus-stop/sistyl","last_synced_at":"2026-05-01T21:33:10.662Z","repository":{"id":29062494,"uuid":"32590346","full_name":"goto-bus-stop/sistyl","owner":"goto-bus-stop","description":"Simple JSON-to-CSS style sheet library.","archived":false,"fork":false,"pushed_at":"2017-10-21T15:26:45.000Z","size":30,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-02T03:04:55.214Z","etag":null,"topics":["css","json"],"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/goto-bus-stop.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":"2015-03-20T15:05:33.000Z","updated_at":"2019-05-31T01:46:47.000Z","dependencies_parsed_at":"2022-07-08T03:01:36.276Z","dependency_job_id":null,"html_url":"https://github.com/goto-bus-stop/sistyl","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goto-bus-stop%2Fsistyl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goto-bus-stop%2Fsistyl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goto-bus-stop%2Fsistyl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goto-bus-stop%2Fsistyl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goto-bus-stop","download_url":"https://codeload.github.com/goto-bus-stop/sistyl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245944062,"owners_count":20697948,"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":["css","json"],"created_at":"2024-10-01T15:25:28.527Z","updated_at":"2025-10-19T13:29:52.751Z","avatar_url":"https://github.com/goto-bus-stop.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sistyl\nSimple JSON-to-CSS style sheet library.\n\n[![NPM](https://nodei.co/npm/sistyl.png?compact=true)](https://nodei.co/npm/sistyl)\n\n## Usage\n\n```javascript\nconst sistyl = require('sistyl')\n\nlet st = sistyl({\n\n  '.selector': {\n    'color': '#111',\n    'background': '#333',\n\n    '.larger': { 'font-size': '125%' }\n  },\n\n  '.hidden': { 'display': 'none !important' }\n\n})\n\n// #111 on a #333 background is kind of hard to read…\nst.set('.selector', { 'color': '#eee' })\n\nst.toString()\n/* →\n * .selector {\n *   color: #eee;\n *   background: #333;\n * }\n *\n * .selector .larger {\n *   font-size: 125%;\n * }\n *\n * .hidden {\n *   display: none !important;\n * }\n */\n```\n\n## API\n\n### let st = sistyl(rulesets={})\n\nCreates a sistyl object with an optional default bunch of rulesets.\n\n### st.set(selector, properties)\n\nSets some CSS properties for a selector. `properties` can contain\nnested rulesets as objects or sistyl instances. Properties are merged\nif the selector already exists.\n\n```javascript\nst.set('.selector', {\n  'background': 'pink',\n  '.nested': { 'background': 'orange' }\n})\n```\n\n### st.set(rulesets)\n\nAdds rulesets. Takes an object where keys are selectors and values\nare css properties, or a sistyl instance, just like in\n`st.set(selector, properties)`.\n\n### st.unset(selector)\n\nRemoves a ruleset. Takes a CSS selector, and removes the associated\nruleset. Note that it removes *just* the given selector, and not\nother rulesets that also match the selector. Specifically,\n`.unset('.rem')` does *not* remove a `.keep, .rem` selector.\n\n### st.unset(selector, property)\n\nRemoves a property from a ruleset. The same notes apply as above:\nonly properties on the *exact* selector string will be removed.\n\n### st.toString()\n\nReturns the CSS string for this sistyl object. Rulesets are separated\nby a newline, and are indented by two spaces.\n\n```css\n.selector {\n  background: pink;\n}\n\n.selector .nested {\n  background: orange;\n}\n\n```\n\n## License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoto-bus-stop%2Fsistyl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoto-bus-stop%2Fsistyl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoto-bus-stop%2Fsistyl/lists"}