diff --git a/github-markdown-dark.css b/github-markdown-dark.css index c65130d..a5a7343 100644 --- a/github-markdown-dark.css +++ b/github-markdown-dark.css @@ -3,15 +3,13 @@ color-scheme: dark; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; + margin: 0; color: #f0f6fc; background-color: #0d1117; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"; font-size: 16px; - word-wrap: break-word; - margin: 0; - min-height: 100vh; line-height: 1.5; - scroll-behavior: smooth; + word-wrap: break-word; } .markdown-body .octicon { @@ -134,12 +132,12 @@ } .markdown-body input { + font: inherit; margin: 0; overflow: visible; font-family: inherit; font-size: inherit; line-height: inherit; - font: inherit; } .markdown-body [type=button], @@ -1101,31 +1099,7 @@ margin-top: 0 !important; } -.markdown-body ul[role='list'], -.markdown-body ol[role='list'] { - list-style: none; -} - -.markdown-body html[focus-within] { - scroll-behavior: smooth; -} - -.markdown-body html:focus-within { - scroll-behavior: smooth; -} - -.markdown-body a:not([class]) { - -webkit-text-decoration-skip: ink; - text-decoration-skip-ink: auto; -} - -.markdown-body img, -.markdown-body picture { - max-width: 100%; - display: block; -} - -.markdown-body [class^=Primer_Brand__Link-module__Link___]::after { - width: calc(100% - 20px); +.markdown-body .highlight pre:has(+.zeroclipboard-container) { + min-height: 52px; } diff --git a/github-markdown-light.css b/github-markdown-light.css index 80b6561..ce0861d 100644 --- a/github-markdown-light.css +++ b/github-markdown-light.css @@ -3,15 +3,13 @@ color-scheme: light; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; + margin: 0; color: #1f2328; background-color: #ffffff; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"; font-size: 16px; - word-wrap: break-word; - margin: 0; - min-height: 100vh; line-height: 1.5; - scroll-behavior: smooth; + word-wrap: break-word; } .markdown-body .octicon { @@ -134,12 +132,12 @@ } .markdown-body input { + font: inherit; margin: 0; overflow: visible; font-family: inherit; font-size: inherit; line-height: inherit; - font: inherit; } .markdown-body [type=button], @@ -1101,31 +1099,7 @@ margin-top: 0 !important; } -.markdown-body ul[role='list'], -.markdown-body ol[role='list'] { - list-style: none; -} - -.markdown-body html[focus-within] { - scroll-behavior: smooth; -} - -.markdown-body html:focus-within { - scroll-behavior: smooth; -} - -.markdown-body a:not([class]) { - -webkit-text-decoration-skip: ink; - text-decoration-skip-ink: auto; -} - -.markdown-body img, -.markdown-body picture { - max-width: 100%; - display: block; -} - -.markdown-body [class^=Primer_Brand__Link-module__Link___]::after { - width: calc(100% - 20px); +.markdown-body .highlight pre:has(+.zeroclipboard-container) { + min-height: 52px; } diff --git a/github-markdown.css b/github-markdown.css index 257b921..bc8e12b 100644 --- a/github-markdown.css +++ b/github-markdown.css @@ -126,15 +126,13 @@ .markdown-body { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; + margin: 0; color: var(--fgColor-default); background-color: var(--bgColor-default); font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"; font-size: 16px; - word-wrap: break-word; - margin: 0; - min-height: 100vh; line-height: 1.5; - scroll-behavior: smooth; + word-wrap: break-word; } .markdown-body .octicon { @@ -257,12 +255,12 @@ } .markdown-body input { + font: inherit; margin: 0; overflow: visible; font-family: inherit; font-size: inherit; line-height: inherit; - font: inherit; } .markdown-body [type=button], @@ -1224,31 +1222,7 @@ margin-top: 0 !important; } -.markdown-body ul[role='list'], -.markdown-body ol[role='list'] { - list-style: none; -} - -.markdown-body html[focus-within] { - scroll-behavior: smooth; -} - -.markdown-body html:focus-within { - scroll-behavior: smooth; -} - -.markdown-body a:not([class]) { - -webkit-text-decoration-skip: ink; - text-decoration-skip-ink: auto; -} - -.markdown-body img, -.markdown-body picture { - max-width: 100%; - display: block; -} - -.markdown-body [class^=Primer_Brand__Link-module__Link___]::after { - width: calc(100% - 20px); +.markdown-body .highlight pre:has(+.zeroclipboard-container) { + min-height: 52px; } diff --git a/package.json b/package.json index f91fa99..67150e3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "github-markdown-css", - "version": "5.8.0", + "version": "5.8.1", "description": "The minimal amount of CSS to replicate the GitHub Markdown style", "license": "MIT", "repository": "sindresorhus/github-markdown-css", @@ -35,6 +35,6 @@ "stylesheet" ], "devDependencies": { - "generate-github-markdown-css": "^6.5.0" + "generate-github-markdown-css": "^6.5.1" } } diff --git a/readme.md b/readme.md index 486d8d9..abff134 100644 --- a/readme.md +++ b/readme.md @@ -58,6 +58,17 @@ You may know that now GitHub supports more than 2 themes including `dark_dimmed` See [`generate-github-markdown-css`](https://github.com/sindresorhus/generate-github-markdown-css) for how it's generated and ability to generate your own. +## Troubleshooting + +If 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. + +To avoid quirks mode, always include a doctype at the top of your page. + +```html + + +``` + ## Dev Run `npm run make` to update the CSS.