{"id":16882873,"url":"https://github.com/alhadis/atom-githubsyntax","last_synced_at":"2025-03-20T05:19:56.771Z","repository":{"id":78377293,"uuid":"463782176","full_name":"Alhadis/Atom-GitHubSyntax","owner":"Alhadis","description":"Up-to-date syntax theme for Atom that matches GitHub's motif, including day/night mode.","archived":false,"fork":false,"pushed_at":"2023-04-02T22:52:32.000Z","size":459,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-25T06:43:22.642Z","etag":null,"topics":["atom","atom-theme","syntax-highlighting","syntax-theme"],"latest_commit_sha":null,"homepage":"https://atom.io/themes/atom-github-syntax","language":"Less","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/Alhadis.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2022-02-26T07:12:55.000Z","updated_at":"2023-01-04T09:57:15.000Z","dependencies_parsed_at":"2023-04-09T19:47:43.529Z","dependency_job_id":null,"html_url":"https://github.com/Alhadis/Atom-GitHubSyntax","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alhadis%2FAtom-GitHubSyntax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alhadis%2FAtom-GitHubSyntax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alhadis%2FAtom-GitHubSyntax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alhadis%2FAtom-GitHubSyntax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Alhadis","download_url":"https://codeload.github.com/Alhadis/Atom-GitHubSyntax/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244554401,"owners_count":20471216,"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":["atom","atom-theme","syntax-highlighting","syntax-theme"],"created_at":"2024-10-13T16:08:58.808Z","updated_at":"2025-03-20T05:19:56.750Z","avatar_url":"https://github.com/Alhadis.png","language":"Less","readme":"\u003c!--*-tab-width:4;indent-tabs-mode:t;fill-column:80-*-#vi:se ts=4 noet tw=80:--\u003e\nGitHub syntax theme for Atom\n============================\n\nThis is a syntax highlighting theme for [Atom](https://atom.io/) that replicates\nthe exact appearance of highlighted source-code on GitHub.com. It was created to\nfacilitate development of TextMate-compatible grammars [for use on GitHub][1].\n\n![Comparison between syntax theme and GitHub's styling (as of 2022-02-26)][2]\n\n\nFeatures\n--------\n*\tAutomatic dark-mode detected from system settings.\n*\tSupport for high-contrast and “dimmed” theme variants.\n*\tSupport for [colourblind users][3] (protanopia, deuteranopia, tritanopia)\n*\tPathologically-accurate highlighting (see next section)\n*\tAutomated styling updates; run `tools/update-styles.sh` to update CSS.\n\nTo-do list\n----------\n*\t[ ] Setup continuous integration\n*\t[ ] Write up contributor docs\n*\t[x] Add setting to enable manual dark/light-mode selection\n*\t[ ] Investigate supporting ChromeDriver for headless updates\n\n\nTextMate vs CSS\n---------------\n[TextMate Scope Selectors](https://macromates.com/manual/en/scope_selectors) are\nnot completely compatible with [CSS classes](http://mdn.io/CSS/Class_selectors),\ndespite sharing a superficial resemblance:\n\n\t.string.quoted.double      CSS\n\t string.quoted.double      TextMate\n\nIn CSS, the order in which classes are listed in a class selector is irrelevant:\n`.string.quoted.double` is behaves the same as `.double.quoted.string`. TextMate\nselectors, however, are sensitive to the order in which scopes are listed, which\nmeans  `string.quoted` matches `string.quoted.double` but *not* `quoted.string`,\n`string.foo.quoted`, or even `foo.string.quoted`.\n\n### Why is this relevant?\nGitHub uses TextMate selectors to map tokenised scope-lists onto CSS classes. In\nrare cases, a grammar might specify a scope-list that TextMate and CSS selectors\ninterpret differently. For example, consider the following pattern:\n\n~~~cson\nname: \"variable.global.other\"\nmatch: /\\$\\w+/\n~~~\n\nGitHub recognises both the `variable` and `variable.other` scopes, and assigns a\ndifferent colour to each. On GitHub, the aforementioned rule will be highlighted\nas the former (`variable`), whereas a naïve theme targeting `.variable.other` in\nCSS will see the latter.\n\n### The solution\nCSS provides no elegant way to implement an “order-dependent class selector”. An\nugly alternative is to use attribute selectors instead:\n\n~~~less\n// NB: This example omits the rebarbative `syntax--` prefix necessitated by Atom\n:is([class=\"string quoted double\"], [class^=\"string quoted double \"]){\n\t\n}\n~~~\n\nAstute authors will correctly note several limitations with this approach:\n\n1.\t**Classes must be separated by a single space (`U+0020`) only.**  \n\tMultiple spaces or other whitespace characters won't match.\n2.\t**`class` attributes cannot contain leading or trailing whitespace.**\n3.\t**Selectors must avoid matching more qualified scope-lists.**  \n\tE.g., `variable.other` should not inherit the styling applied to\n\t`variable`, or vice versa. This requires the inclusion of a `:not()`\n\tqualifier for every conflicting scope-list. For example:\n\t~~~less\n\t// Target \"string\" scope, but not more qualified selectors\n\t// such as \"string.quoted.double\" or \"string.quoted.single\"\n\t:is([class^=\"string \"]):not(\n\t\t[class^=\"string quoted double\"],\n\t\t[class^=\"string quoted single\"]\n\t){ }\n\t~~~\n4.\t**The list of supported scopes must be known ahead-of-time.**  \n\tThis is stipulated by the previous point.\n\nThankfully, each constraint is satisfied by Atom's [built-in use of Less][4] for\ngenerating stylesheets. A [script][5] is provided for regenerating the scope-map\nvariables listed in [`scope-map.less`](styles/includes/scope-map.less).\n\n### Related links\n*\t[Live preview of all TextMate scopes supported by GitHub][6]\n*\t[`textmate(5)` man page][7] documenting the TextMate grammar format.\n*\t[SCSS source][8] for Primer's various colour-themes. It's not directly\n\tused by this project out of an overabundance of caution—no assumptions\n\tare ever made about the stability of GitHub's pipeline and front-end.\n\n\u003c!-- Referenced links ---------------------------------------------------------\u003e\n[1]: https://github.com/github/linguist/blob/HEAD/CONTRIBUTING.md\n[2]: https://github.com/Alhadis/Atom-GitHubSyntax/blob/static/preview.svg?raw=1\n[3]: https://github.com/github/roadmap/issues/357\n[4]: http://bit.ly/3zqD0Br\n[5]: ./tools/build-scope-map.mjs\n[6]: https://git.io/Jf1IY\n[7]: https://github.com/Alhadis/.files/blob/HEAD/share/man/man5/textmate.5\n[8]: https://github.com/primer/css/tree/main/src/color-modes\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falhadis%2Fatom-githubsyntax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falhadis%2Fatom-githubsyntax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falhadis%2Fatom-githubsyntax/lists"}