{"name":"github-markdown-css","version":"5.8.0","keywords":["browser","github","markdown","md","css","style","stylesheet"],"author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"github-markdown-css@5.8.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/github-markdown-css#readme","bugs":{"url":"https://github.com/sindresorhus/github-markdown-css/issues"},"dist":{"shasum":"6770ea1cb7e41715edc69a27bce38cde6eb4856f","tarball":"http://registry-npm.ywwl.com/github-markdown-css/download/github-markdown-css-5.8.0.tgz","fileCount":6,"integrity":"sha512-dSyhHzwQw4+5z+JveMY66o4PdbRP7ORjCiR5f1DjIDM5sSSE9rrRG5jpXGgx0PUMJC7goIzLtEJyItT2tL8IsQ==","signatures":[{"sig":"MEYCIQD0WCCwicqeoHlQ/6prQHf13/J/ohJirQVAIukjNvcS8AIhAI3Pd6YE1aHb7aQyccABl8LualOSXcmsYc6VVVOZ09L6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":78455,"size":9304,"noattachment":false,"key":"/github-markdown-css/-/github-markdown-css-5.8.0.tgz"},"main":"github-markdown.css","engines":{"node":">=10"},"funding":"https://github.com/sponsors/sindresorhus","gitHead":"9ab210a7b09f657d0b79321e8135017d9d64236a","scripts":{"make":"npm run make:light && npm run make:dark && npm run make:auto","make:auto":"github-markdown-css --no-use-fixture --type auto > github-markdown.css","make:dark":"github-markdown-css --no-use-fixture --type dark > github-markdown-dark.css","make:light":"github-markdown-css --no-use-fixture --type light > github-markdown-light.css"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/github-markdown-css.git","type":"git"},"_npmVersion":"10.6.0","description":"The minimal amount of CSS to replicate the GitHub Markdown style","directories":{},"_nodeVersion":"18.20.4","_hasShrinkwrap":false,"devDependencies":{"generate-github-markdown-css":"^6.5.0"},"_npmOperationalInternal":{"tmp":"tmp/github-markdown-css_5.8.0_1731692067912_0.2765659950089303","host":"s3://npm-registry-packages"},"readme":"# github-markdown-css\n\n> The minimal amount of CSS to replicate the GitHub Markdown style\n\n**The CSS is generated. Contributions should go to [this repo](https://github.com/sindresorhus/generate-github-markdown-css).**\n\n[<img src=\"https://cloud.githubusercontent.com/assets/170270/5219062/f22a978c-7685-11e4-8316-af25b6c89bc0.png\" width=\"300\">](http://sindresorhus.com/github-markdown-css)\n\n## [Demo](https://sindresorhus.com/github-markdown-css)\n\n## Install\n\nDownload [manually](https://raw.githubusercontent.com/sindresorhus/github-markdown-css/gh-pages/github-markdown.css), from [CDNJS](https://cdnjs.com/libraries/github-markdown-css), or with npm:\n\n```sh\nnpm install github-markdown-css\n```\n\n## Usage\n\nImport the `github-markdown.css` file and add a `markdown-body` class to the container of your rendered Markdown and set a width for it. GitHub uses `980px` width and `45px` padding, and `15px` padding for mobile.\n\n```html\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<link rel=\"stylesheet\" href=\"github-markdown.css\">\n<style>\n\t.markdown-body {\n\t\tbox-sizing: border-box;\n\t\tmin-width: 200px;\n\t\tmax-width: 980px;\n\t\tmargin: 0 auto;\n\t\tpadding: 45px;\n\t}\n\n\t@media (max-width: 767px) {\n\t\t.markdown-body {\n\t\t\tpadding: 15px;\n\t\t}\n\t}\n</style>\n<article class=\"markdown-body\">\n\t<h1>Unicorns</h1>\n\t<p>All the things</p>\n</article>\n```\n\nYou can use [GitHub's `/markdown` API](https://docs.github.com/en/free-pro-team@latest/rest/reference/markdown) to turn Markdown into the HTML that GitHub generates, which works well with the CSS in this repo. Other Markdown parsers will mostly work with these styles too. To mimic how GitHub highlights code, you can use [`starry-night`](https://github.com/wooorm/starry-night) with your Markdown parser of choice.\n\nThere are 7 themes provided in this package:\n\n- **github-markdown.css**: (default) Automatically switches between light and dark through [`@media (prefers-color-scheme)`](https://developer.mozilla.org/docs/Web/CSS/@media/prefers-color-scheme).\n- **github-markdown-light.css**: Light-only.\n- **github-markdown-dark.css**: Dark-only.\n- **github-markdown-dark-dimmed.css**: Dark dimmed.\n- **github-markdown-dark-high-contrast.css**: Dark high contrast.\n- **github-markdown-dark-colorblind.css**: Dark Protanopia & Deuteranopia.\n- **github-markdown-light-colorblind.css**: Light Protanopia & Deuteranopia.\n\n## How\n\nSee [`generate-github-markdown-css`](https://github.com/sindresorhus/generate-github-markdown-css) for how it's generated and ability to generate your own.\n\n## Troubleshooting\n\nIf you encounter styling issues, like tables in dark mode rendering their fonts in black, the browser might uses [quirks mode](https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode) by accident.\n\nTo avoid quirks mode, always include a doctype at the top of your page.\n\n```html\n<!doctype html>\n<html lang=\"en\"><head></head><body></body></html>\n```\n\n## Dev\n\nRun `npm run make` to update the CSS.\n","publish_time":1731692068099,"_cnpm_publish_time":1731692068099,"dist-tags":{"latest":"5.9.0"}}