diff --git a/.github/funding.yml b/.github/funding.yml deleted file mode 100644 index bb3241e..0000000 --- a/.github/funding.yml +++ /dev/null @@ -1,4 +0,0 @@ -github: sindresorhus -open_collective: sindresorhus -tidelift: npm/github-markdown-css -custom: https://sindresorhus.com/donate diff --git a/github-markdown-dark.css b/github-markdown-dark.css index 3c5a8b3..a5a7343 100644 --- a/github-markdown-dark.css +++ b/github-markdown-dark.css @@ -1,9 +1,10 @@ +/* dark */ .markdown-body { color-scheme: dark; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; margin: 0; - color: #c9d1d9; + 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; @@ -48,12 +49,13 @@ .markdown-body a { background-color: transparent; - color: #58a6ff; + color: #4493f8; text-decoration: none; } .markdown-body abbr[title] { border-bottom: none; + -webkit-text-decoration: underline dotted; text-decoration: underline dotted; } @@ -71,12 +73,12 @@ font-weight: 600; padding-bottom: .3em; font-size: 2em; - border-bottom: 1px solid #21262d; + border-bottom: 1px solid #3d444db3; } .markdown-body mark { - background-color: rgba(187,128,9,0.15); - color: #c9d1d9; + background-color: #bb800926; + color: #f0f6fc; } .markdown-body small { @@ -103,7 +105,6 @@ border-style: none; max-width: 100%; box-sizing: content-box; - background-color: #0d1117; } .markdown-body code, @@ -115,18 +116,18 @@ } .markdown-body figure { - margin: 1em 40px; + margin: 1em 2.5rem; } .markdown-body hr { box-sizing: content-box; overflow: hidden; background: transparent; - border-bottom: 1px solid #21262d; + border-bottom: 1px solid #3d444db3; height: .25em; padding: 0; - margin: 24px 0; - background-color: #30363d; + margin: 1.5rem 0; + background-color: #3d444d; border: 0; } @@ -143,6 +144,7 @@ .markdown-body [type=reset], .markdown-body [type=submit] { -webkit-appearance: button; + appearance: button; } .markdown-body [type=checkbox], @@ -159,6 +161,7 @@ .markdown-body [type=search]::-webkit-search-cancel-button, .markdown-body [type=search]::-webkit-search-decoration { -webkit-appearance: none; + appearance: none; } .markdown-body ::-webkit-input-placeholder { @@ -168,6 +171,7 @@ .markdown-body ::-webkit-file-upload-button { -webkit-appearance: button; + appearance: button; font: inherit; } @@ -176,7 +180,7 @@ } .markdown-body ::placeholder { - color: #6e7681; + color: #9198a1; opacity: 1; } @@ -198,6 +202,7 @@ width: max-content; max-width: 100%; overflow: auto; + font-variant: tabular-nums; } .markdown-body td, @@ -209,15 +214,11 @@ cursor: pointer; } -.markdown-body details:not([open])>*:not(summary) { - display: none !important; -} - .markdown-body a:focus, .markdown-body [role=button]:focus, .markdown-body input[type=radio]:focus, .markdown-body input[type=checkbox]:focus { - outline: 2px solid #58a6ff; + outline: 2px solid #1f6feb; outline-offset: -2px; box-shadow: none; } @@ -233,7 +234,7 @@ .markdown-body [role=button]:focus-visible, .markdown-body input[type=radio]:focus-visible, .markdown-body input[type=checkbox]:focus-visible { - outline: 2px solid #58a6ff; + outline: 2px solid #1f6feb; outline-offset: -2px; box-shadow: none; } @@ -249,16 +250,16 @@ .markdown-body kbd { display: inline-block; - padding: 3px 5px; - font: 11px ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; + padding: 0.25rem; + font: 11px ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace; line-height: 10px; - color: #c9d1d9; + color: #f0f6fc; vertical-align: middle; - background-color: #161b22; - border: solid 1px rgba(110,118,129,0.4); - border-bottom-color: rgba(110,118,129,0.4); + background-color: #151b23; + border: solid 1px #3d444db3; + border-bottom-color: #3d444db3; border-radius: 6px; - box-shadow: inset 0 -1px 0 rgba(110,118,129,0.4); + box-shadow: inset 0 -1px 0 #3d444db3; } .markdown-body h1, @@ -267,8 +268,8 @@ .markdown-body h4, .markdown-body h5, .markdown-body h6 { - margin-top: 24px; - margin-bottom: 16px; + margin-top: 1.5rem; + margin-bottom: 1rem; font-weight: 600; line-height: 1.25; } @@ -277,7 +278,7 @@ font-weight: 600; padding-bottom: .3em; font-size: 1.5em; - border-bottom: 1px solid #21262d; + border-bottom: 1px solid #3d444db3; } .markdown-body h3 { @@ -298,7 +299,7 @@ .markdown-body h6 { font-weight: 600; font-size: .85em; - color: #8b949e; + color: #9198a1; } .markdown-body p { @@ -309,8 +310,8 @@ .markdown-body blockquote { margin: 0; padding: 0 1em; - color: #8b949e; - border-left: .25em solid #30363d; + color: #9198a1; + border-left: .25em solid #3d444d; } .markdown-body ul, @@ -339,14 +340,14 @@ .markdown-body tt, .markdown-body code, .markdown-body samp { - font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; + font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace; font-size: 12px; } .markdown-body pre { margin-top: 0; margin-bottom: 0; - font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; + font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace; font-size: 12px; word-wrap: normal; } @@ -361,10 +362,13 @@ .markdown-body input::-webkit-outer-spin-button, .markdown-body input::-webkit-inner-spin-button { margin: 0; - -webkit-appearance: none; appearance: none; } +.markdown-body .mr-2 { + margin-right: 0.5rem !important; +} + .markdown-body::before { display: table; content: ""; @@ -395,7 +399,7 @@ .markdown-body .anchor { float: left; - padding-right: 4px; + padding-right: 0.25rem; margin-left: -20px; line-height: 1; } @@ -413,7 +417,7 @@ .markdown-body pre, .markdown-body details { margin-top: 0; - margin-bottom: 16px; + margin-bottom: 1rem; } .markdown-body blockquote>:first-child { @@ -430,7 +434,7 @@ .markdown-body h4 .octicon-link, .markdown-body h5 .octicon-link, .markdown-body h6 .octicon-link { - color: #c9d1d9; + color: #f0f6fc; vertical-align: middle; visibility: hidden; } @@ -499,19 +503,19 @@ list-style-type: none; } -.markdown-body ol[type=a] { +.markdown-body ol[type="a s"] { list-style-type: lower-alpha; } -.markdown-body ol[type=A] { +.markdown-body ol[type="A s"] { list-style-type: upper-alpha; } -.markdown-body ol[type=i] { +.markdown-body ol[type="i s"] { list-style-type: lower-roman; } -.markdown-body ol[type=I] { +.markdown-body ol[type="I s"] { list-style-type: upper-roman; } @@ -532,7 +536,7 @@ } .markdown-body li>p { - margin-top: 16px; + margin-top: 1rem; } .markdown-body li+li { @@ -545,15 +549,15 @@ .markdown-body dl dt { padding: 0; - margin-top: 16px; + margin-top: 1rem; font-size: 1em; font-style: italic; font-weight: 600; } .markdown-body dl dd { - padding: 0 16px; - margin-bottom: 16px; + padding: 0 1rem; + margin-bottom: 1rem; } .markdown-body table th { @@ -563,16 +567,20 @@ .markdown-body table th, .markdown-body table td { padding: 6px 13px; - border: 1px solid #30363d; + border: 1px solid #3d444d; +} + +.markdown-body table td>:last-child { + margin-bottom: 0; } .markdown-body table tr { background-color: #0d1117; - border-top: 1px solid #21262d; + border-top: 1px solid #3d444db3; } .markdown-body table tr:nth-child(2n) { - background-color: #161b22; + background-color: #151b23; } .markdown-body table img { @@ -605,7 +613,7 @@ padding: 7px; margin: 13px 0 0; overflow: hidden; - border: 1px solid #30363d; + border: 1px solid #3d444d; } .markdown-body span.frame span img { @@ -617,7 +625,7 @@ display: block; padding: 5px 0 0; clear: both; - color: #c9d1d9; + color: #f0f6fc; } .markdown-body span.align-center { @@ -687,7 +695,7 @@ margin: 0; font-size: 85%; white-space: break-spaces; - background-color: rgba(110,118,129,0.4); + background-color: #656c7633; border-radius: 6px; } @@ -718,7 +726,7 @@ } .markdown-body .highlight { - margin-bottom: 16px; + margin-bottom: 1rem; } .markdown-body .highlight pre { @@ -728,11 +736,12 @@ .markdown-body .highlight pre, .markdown-body pre { - padding: 16px; + padding: 1rem; overflow: auto; font-size: 85%; line-height: 1.45; - background-color: #161b22; + color: #f0f6fc; + background-color: #151b23; border-radius: 6px; } @@ -760,7 +769,7 @@ } .markdown-body .csv-data .blob-num { - padding: 10px 8px 9px; + padding: 10px 0.5rem 9px; text-align: right; background: #0d1117; border: 0; @@ -772,7 +781,7 @@ .markdown-body .csv-data th { font-weight: 600; - background: #161b22; + background: #151b23; border-top: 0; } @@ -786,18 +795,18 @@ .markdown-body .footnotes { font-size: 12px; - color: #8b949e; - border-top: 1px solid #30363d; + color: #9198a1; + border-top: 1px solid #3d444d; } .markdown-body .footnotes ol { - padding-left: 16px; + padding-left: 1rem; } .markdown-body .footnotes ol ul { display: inline-block; - padding-left: 16px; - margin-top: 16px; + padding-left: 1rem; + margin-top: 1rem; } .markdown-body .footnotes li { @@ -806,10 +815,10 @@ .markdown-body .footnotes li:target::before { position: absolute; - top: -8px; - right: -8px; - bottom: -8px; - left: -24px; + top: calc(0.5rem*-1); + right: calc(0.5rem*-1); + bottom: calc(0.5rem*-1); + left: calc(1.5rem*-1); pointer-events: none; content: ""; border: 2px solid #1f6feb; @@ -817,15 +826,19 @@ } .markdown-body .footnotes li:target { - color: #c9d1d9; + color: #f0f6fc; } .markdown-body .footnotes .data-footnote-backref g-emoji { font-family: monospace; } +.markdown-body body:has(:modal) { + padding-right: var(--dialog-scrollgutter) !important; +} + .markdown-body .pl-c { - color: #8b949e; + color: #9198a1; } .markdown-body .pl-c1, @@ -840,7 +853,7 @@ .markdown-body .pl-smi, .markdown-body .pl-s .pl-s1 { - color: #c9d1d9; + color: #f0f6fc; } .markdown-body .pl-ent { @@ -898,12 +911,12 @@ .markdown-body .pl-mi { font-style: italic; - color: #c9d1d9; + color: #f0f6fc; } .markdown-body .pl-mb { font-weight: bold; - color: #c9d1d9; + color: #f0f6fc; } .markdown-body .pl-md { @@ -922,7 +935,7 @@ } .markdown-body .pl-mi2 { - color: #c9d1d9; + color: #f0f6fc; background-color: #1158c7; } @@ -932,11 +945,11 @@ } .markdown-body .pl-ba { - color: #8b949e; + color: #9198a1; } .markdown-body .pl-sg { - color: #484f58; + color: #3d444d; } .markdown-body .pl-corl { @@ -944,6 +957,20 @@ color: #a5d6ff; } +.markdown-body [role=button]:focus:not(:focus-visible), +.markdown-body [role=tabpanel][tabindex="0"]:focus:not(:focus-visible), +.markdown-body button:focus:not(:focus-visible), +.markdown-body summary:focus:not(:focus-visible), +.markdown-body a:focus:not(:focus-visible) { + outline: none; + box-shadow: none; +} + +.markdown-body [tabindex="0"]:focus:not(:focus-visible), +.markdown-body details-dialog:focus:not(:focus-visible) { + outline: none; +} + .markdown-body g-emoji { display: inline-block; min-width: 1ch; @@ -973,7 +1000,7 @@ } .markdown-body .task-list-item+.task-list-item { - margin-top: 4px; + margin-top: 0.25rem; } .markdown-body .task-list-item .handle { @@ -985,12 +1012,12 @@ vertical-align: middle; } -.markdown-body .contains-task-list:dir(rtl) .task-list-item-checkbox { +.markdown-body ul:dir(rtl) .task-list-item-checkbox { margin: 0 -1.6em .25em .2em; } -.markdown-body .contains-task-list { - position: relative; +.markdown-body ol:dir(rtl) .task-list-item-checkbox { + margin: 0 -1.6em .25em .2em; } .markdown-body .contains-task-list:hover .task-list-item-convert-container, @@ -1005,3 +1032,74 @@ .markdown-body ::-webkit-calendar-picker-indicator { filter: invert(50%); } + +.markdown-body .markdown-alert { + padding: 0.5rem 1rem; + margin-bottom: 1rem; + color: inherit; + border-left: .25em solid #3d444d; +} + +.markdown-body .markdown-alert>:first-child { + margin-top: 0; +} + +.markdown-body .markdown-alert>:last-child { + margin-bottom: 0; +} + +.markdown-body .markdown-alert .markdown-alert-title { + display: flex; + font-weight: 500; + align-items: center; + line-height: 1; +} + +.markdown-body .markdown-alert.markdown-alert-note { + border-left-color: #1f6feb; +} + +.markdown-body .markdown-alert.markdown-alert-note .markdown-alert-title { + color: #4493f8; +} + +.markdown-body .markdown-alert.markdown-alert-important { + border-left-color: #8957e5; +} + +.markdown-body .markdown-alert.markdown-alert-important .markdown-alert-title { + color: #ab7df8; +} + +.markdown-body .markdown-alert.markdown-alert-warning { + border-left-color: #9e6a03; +} + +.markdown-body .markdown-alert.markdown-alert-warning .markdown-alert-title { + color: #d29922; +} + +.markdown-body .markdown-alert.markdown-alert-tip { + border-left-color: #238636; +} + +.markdown-body .markdown-alert.markdown-alert-tip .markdown-alert-title { + color: #3fb950; +} + +.markdown-body .markdown-alert.markdown-alert-caution { + border-left-color: #da3633; +} + +.markdown-body .markdown-alert.markdown-alert-caution .markdown-alert-title { + color: #f85149; +} + +.markdown-body>*:first-child>.heading-element:first-child { + margin-top: 0 !important; +} + +.markdown-body .highlight pre:has(+.zeroclipboard-container) { + min-height: 52px; +} + diff --git a/github-markdown-light.css b/github-markdown-light.css index 33766e8..ce0861d 100644 --- a/github-markdown-light.css +++ b/github-markdown-light.css @@ -1,8 +1,10 @@ +/* light */ .markdown-body { + color-scheme: light; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; margin: 0; - color: #24292f; + 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; @@ -53,6 +55,7 @@ .markdown-body abbr[title] { border-bottom: none; + -webkit-text-decoration: underline dotted; text-decoration: underline dotted; } @@ -70,12 +73,12 @@ font-weight: 600; padding-bottom: .3em; font-size: 2em; - border-bottom: 1px solid hsla(210,18%,87%,1); + border-bottom: 1px solid #d1d9e0b3; } .markdown-body mark { background-color: #fff8c5; - color: #24292f; + color: #1f2328; } .markdown-body small { @@ -102,7 +105,6 @@ border-style: none; max-width: 100%; box-sizing: content-box; - background-color: #ffffff; } .markdown-body code, @@ -114,18 +116,18 @@ } .markdown-body figure { - margin: 1em 40px; + margin: 1em 2.5rem; } .markdown-body hr { box-sizing: content-box; overflow: hidden; background: transparent; - border-bottom: 1px solid hsla(210,18%,87%,1); + border-bottom: 1px solid #d1d9e0b3; height: .25em; padding: 0; - margin: 24px 0; - background-color: #d0d7de; + margin: 1.5rem 0; + background-color: #d1d9e0; border: 0; } @@ -142,6 +144,7 @@ .markdown-body [type=reset], .markdown-body [type=submit] { -webkit-appearance: button; + appearance: button; } .markdown-body [type=checkbox], @@ -158,6 +161,7 @@ .markdown-body [type=search]::-webkit-search-cancel-button, .markdown-body [type=search]::-webkit-search-decoration { -webkit-appearance: none; + appearance: none; } .markdown-body ::-webkit-input-placeholder { @@ -167,6 +171,7 @@ .markdown-body ::-webkit-file-upload-button { -webkit-appearance: button; + appearance: button; font: inherit; } @@ -175,7 +180,7 @@ } .markdown-body ::placeholder { - color: #6e7781; + color: #59636e; opacity: 1; } @@ -197,6 +202,7 @@ width: max-content; max-width: 100%; overflow: auto; + font-variant: tabular-nums; } .markdown-body td, @@ -208,10 +214,6 @@ cursor: pointer; } -.markdown-body details:not([open])>*:not(summary) { - display: none !important; -} - .markdown-body a:focus, .markdown-body [role=button]:focus, .markdown-body input[type=radio]:focus, @@ -248,16 +250,16 @@ .markdown-body kbd { display: inline-block; - padding: 3px 5px; - font: 11px ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; + padding: 0.25rem; + font: 11px ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace; line-height: 10px; - color: #24292f; + color: #1f2328; vertical-align: middle; background-color: #f6f8fa; - border: solid 1px rgba(175,184,193,0.2); - border-bottom-color: rgba(175,184,193,0.2); + border: solid 1px #d1d9e0b3; + border-bottom-color: #d1d9e0b3; border-radius: 6px; - box-shadow: inset 0 -1px 0 rgba(175,184,193,0.2); + box-shadow: inset 0 -1px 0 #d1d9e0b3; } .markdown-body h1, @@ -266,8 +268,8 @@ .markdown-body h4, .markdown-body h5, .markdown-body h6 { - margin-top: 24px; - margin-bottom: 16px; + margin-top: 1.5rem; + margin-bottom: 1rem; font-weight: 600; line-height: 1.25; } @@ -276,7 +278,7 @@ font-weight: 600; padding-bottom: .3em; font-size: 1.5em; - border-bottom: 1px solid hsla(210,18%,87%,1); + border-bottom: 1px solid #d1d9e0b3; } .markdown-body h3 { @@ -297,7 +299,7 @@ .markdown-body h6 { font-weight: 600; font-size: .85em; - color: #57606a; + color: #59636e; } .markdown-body p { @@ -308,8 +310,8 @@ .markdown-body blockquote { margin: 0; padding: 0 1em; - color: #57606a; - border-left: .25em solid #d0d7de; + color: #59636e; + border-left: .25em solid #d1d9e0; } .markdown-body ul, @@ -338,14 +340,14 @@ .markdown-body tt, .markdown-body code, .markdown-body samp { - font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; + font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace; font-size: 12px; } .markdown-body pre { margin-top: 0; margin-bottom: 0; - font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; + font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace; font-size: 12px; word-wrap: normal; } @@ -360,10 +362,13 @@ .markdown-body input::-webkit-outer-spin-button, .markdown-body input::-webkit-inner-spin-button { margin: 0; - -webkit-appearance: none; appearance: none; } +.markdown-body .mr-2 { + margin-right: 0.5rem !important; +} + .markdown-body::before { display: table; content: ""; @@ -389,12 +394,12 @@ } .markdown-body .absent { - color: #cf222e; + color: #d1242f; } .markdown-body .anchor { float: left; - padding-right: 4px; + padding-right: 0.25rem; margin-left: -20px; line-height: 1; } @@ -412,7 +417,7 @@ .markdown-body pre, .markdown-body details { margin-top: 0; - margin-bottom: 16px; + margin-bottom: 1rem; } .markdown-body blockquote>:first-child { @@ -429,7 +434,7 @@ .markdown-body h4 .octicon-link, .markdown-body h5 .octicon-link, .markdown-body h6 .octicon-link { - color: #24292f; + color: #1f2328; vertical-align: middle; visibility: hidden; } @@ -498,19 +503,19 @@ list-style-type: none; } -.markdown-body ol[type=a] { +.markdown-body ol[type="a s"] { list-style-type: lower-alpha; } -.markdown-body ol[type=A] { +.markdown-body ol[type="A s"] { list-style-type: upper-alpha; } -.markdown-body ol[type=i] { +.markdown-body ol[type="i s"] { list-style-type: lower-roman; } -.markdown-body ol[type=I] { +.markdown-body ol[type="I s"] { list-style-type: upper-roman; } @@ -531,7 +536,7 @@ } .markdown-body li>p { - margin-top: 16px; + margin-top: 1rem; } .markdown-body li+li { @@ -544,15 +549,15 @@ .markdown-body dl dt { padding: 0; - margin-top: 16px; + margin-top: 1rem; font-size: 1em; font-style: italic; font-weight: 600; } .markdown-body dl dd { - padding: 0 16px; - margin-bottom: 16px; + padding: 0 1rem; + margin-bottom: 1rem; } .markdown-body table th { @@ -562,12 +567,16 @@ .markdown-body table th, .markdown-body table td { padding: 6px 13px; - border: 1px solid #d0d7de; + border: 1px solid #d1d9e0; +} + +.markdown-body table td>:last-child { + margin-bottom: 0; } .markdown-body table tr { background-color: #ffffff; - border-top: 1px solid hsla(210,18%,87%,1); + border-top: 1px solid #d1d9e0b3; } .markdown-body table tr:nth-child(2n) { @@ -604,7 +613,7 @@ padding: 7px; margin: 13px 0 0; overflow: hidden; - border: 1px solid #d0d7de; + border: 1px solid #d1d9e0; } .markdown-body span.frame span img { @@ -616,7 +625,7 @@ display: block; padding: 5px 0 0; clear: both; - color: #24292f; + color: #1f2328; } .markdown-body span.align-center { @@ -686,7 +695,7 @@ margin: 0; font-size: 85%; white-space: break-spaces; - background-color: rgba(175,184,193,0.2); + background-color: #818b981f; border-radius: 6px; } @@ -717,7 +726,7 @@ } .markdown-body .highlight { - margin-bottom: 16px; + margin-bottom: 1rem; } .markdown-body .highlight pre { @@ -727,10 +736,11 @@ .markdown-body .highlight pre, .markdown-body pre { - padding: 16px; + padding: 1rem; overflow: auto; font-size: 85%; line-height: 1.45; + color: #1f2328; background-color: #f6f8fa; border-radius: 6px; } @@ -759,7 +769,7 @@ } .markdown-body .csv-data .blob-num { - padding: 10px 8px 9px; + padding: 10px 0.5rem 9px; text-align: right; background: #ffffff; border: 0; @@ -785,18 +795,18 @@ .markdown-body .footnotes { font-size: 12px; - color: #57606a; - border-top: 1px solid #d0d7de; + color: #59636e; + border-top: 1px solid #d1d9e0; } .markdown-body .footnotes ol { - padding-left: 16px; + padding-left: 1rem; } .markdown-body .footnotes ol ul { display: inline-block; - padding-left: 16px; - margin-top: 16px; + padding-left: 1rem; + margin-top: 1rem; } .markdown-body .footnotes li { @@ -805,10 +815,10 @@ .markdown-body .footnotes li:target::before { position: absolute; - top: -8px; - right: -8px; - bottom: -8px; - left: -24px; + top: calc(0.5rem*-1); + right: calc(0.5rem*-1); + bottom: calc(0.5rem*-1); + left: calc(1.5rem*-1); pointer-events: none; content: ""; border: 2px solid #0969da; @@ -816,15 +826,19 @@ } .markdown-body .footnotes li:target { - color: #24292f; + color: #1f2328; } .markdown-body .footnotes .data-footnote-backref g-emoji { font-family: monospace; } +.markdown-body body:has(:modal) { + padding-right: var(--dialog-scrollgutter) !important; +} + .markdown-body .pl-c { - color: #6e7781; + color: #59636e; } .markdown-body .pl-c1, @@ -834,16 +848,16 @@ .markdown-body .pl-e, .markdown-body .pl-en { - color: #8250df; + color: #6639ba; } .markdown-body .pl-smi, .markdown-body .pl-s .pl-s1 { - color: #24292f; + color: #1f2328; } .markdown-body .pl-ent { - color: #116329; + color: #0550ae; } .markdown-body .pl-k { @@ -897,12 +911,12 @@ .markdown-body .pl-mi { font-style: italic; - color: #24292f; + color: #1f2328; } .markdown-body .pl-mb { font-weight: bold; - color: #24292f; + color: #1f2328; } .markdown-body .pl-md { @@ -921,7 +935,7 @@ } .markdown-body .pl-mi2 { - color: #eaeef2; + color: #d1d9e0; background-color: #0550ae; } @@ -931,11 +945,11 @@ } .markdown-body .pl-ba { - color: #57606a; + color: #59636e; } .markdown-body .pl-sg { - color: #8c959f; + color: #818b98; } .markdown-body .pl-corl { @@ -943,6 +957,20 @@ color: #0a3069; } +.markdown-body [role=button]:focus:not(:focus-visible), +.markdown-body [role=tabpanel][tabindex="0"]:focus:not(:focus-visible), +.markdown-body button:focus:not(:focus-visible), +.markdown-body summary:focus:not(:focus-visible), +.markdown-body a:focus:not(:focus-visible) { + outline: none; + box-shadow: none; +} + +.markdown-body [tabindex="0"]:focus:not(:focus-visible), +.markdown-body details-dialog:focus:not(:focus-visible) { + outline: none; +} + .markdown-body g-emoji { display: inline-block; min-width: 1ch; @@ -972,7 +1000,7 @@ } .markdown-body .task-list-item+.task-list-item { - margin-top: 4px; + margin-top: 0.25rem; } .markdown-body .task-list-item .handle { @@ -984,12 +1012,12 @@ vertical-align: middle; } -.markdown-body .contains-task-list:dir(rtl) .task-list-item-checkbox { +.markdown-body ul:dir(rtl) .task-list-item-checkbox { margin: 0 -1.6em .25em .2em; } -.markdown-body .contains-task-list { - position: relative; +.markdown-body ol:dir(rtl) .task-list-item-checkbox { + margin: 0 -1.6em .25em .2em; } .markdown-body .contains-task-list:hover .task-list-item-convert-container, @@ -1004,3 +1032,74 @@ .markdown-body ::-webkit-calendar-picker-indicator { filter: invert(50%); } + +.markdown-body .markdown-alert { + padding: 0.5rem 1rem; + margin-bottom: 1rem; + color: inherit; + border-left: .25em solid #d1d9e0; +} + +.markdown-body .markdown-alert>:first-child { + margin-top: 0; +} + +.markdown-body .markdown-alert>:last-child { + margin-bottom: 0; +} + +.markdown-body .markdown-alert .markdown-alert-title { + display: flex; + font-weight: 500; + align-items: center; + line-height: 1; +} + +.markdown-body .markdown-alert.markdown-alert-note { + border-left-color: #0969da; +} + +.markdown-body .markdown-alert.markdown-alert-note .markdown-alert-title { + color: #0969da; +} + +.markdown-body .markdown-alert.markdown-alert-important { + border-left-color: #8250df; +} + +.markdown-body .markdown-alert.markdown-alert-important .markdown-alert-title { + color: #8250df; +} + +.markdown-body .markdown-alert.markdown-alert-warning { + border-left-color: #9a6700; +} + +.markdown-body .markdown-alert.markdown-alert-warning .markdown-alert-title { + color: #9a6700; +} + +.markdown-body .markdown-alert.markdown-alert-tip { + border-left-color: #1a7f37; +} + +.markdown-body .markdown-alert.markdown-alert-tip .markdown-alert-title { + color: #1a7f37; +} + +.markdown-body .markdown-alert.markdown-alert-caution { + border-left-color: #cf222e; +} + +.markdown-body .markdown-alert.markdown-alert-caution .markdown-alert-title { + color: #d1242f; +} + +.markdown-body>*:first-child>.heading-element:first-child { + margin-top: 0 !important; +} + +.markdown-body .highlight pre:has(+.zeroclipboard-container) { + min-height: 52px; +} + diff --git a/github-markdown.css b/github-markdown.css index 0c333ba..bc8e12b 100644 --- a/github-markdown.css +++ b/github-markdown.css @@ -1,15 +1,50 @@ +.markdown-body { + --base-size-4: 0.25rem; + --base-size-8: 0.5rem; + --base-size-16: 1rem; + --base-size-24: 1.5rem; + --base-size-40: 2.5rem; + --base-text-weight-normal: 400; + --base-text-weight-medium: 500; + --base-text-weight-semibold: 600; + --fontStack-monospace: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace; + --fgColor-accent: Highlight; +} @media (prefers-color-scheme: dark) { - .markdown-body { + .markdown-body, [data-theme="dark"] { + /* dark */ color-scheme: dark; - --color-prettylights-syntax-comment: #8b949e; + --focus-outlineColor: #1f6feb; + --fgColor-default: #f0f6fc; + --fgColor-muted: #9198a1; + --fgColor-accent: #4493f8; + --fgColor-success: #3fb950; + --fgColor-attention: #d29922; + --fgColor-danger: #f85149; + --fgColor-done: #ab7df8; + --bgColor-default: #0d1117; + --bgColor-muted: #151b23; + --bgColor-neutral-muted: #656c7633; + --bgColor-attention-muted: #bb800926; + --borderColor-default: #3d444d; + --borderColor-muted: #3d444db3; + --borderColor-neutral-muted: #3d444db3; + --borderColor-accent-emphasis: #1f6feb; + --borderColor-success-emphasis: #238636; + --borderColor-attention-emphasis: #9e6a03; + --borderColor-danger-emphasis: #da3633; + --borderColor-done-emphasis: #8957e5; + --color-prettylights-syntax-comment: #9198a1; --color-prettylights-syntax-constant: #79c0ff; + --color-prettylights-syntax-constant-other-reference-link: #a5d6ff; --color-prettylights-syntax-entity: #d2a8ff; - --color-prettylights-syntax-storage-modifier-import: #c9d1d9; + --color-prettylights-syntax-storage-modifier-import: #f0f6fc; --color-prettylights-syntax-entity-tag: #7ee787; --color-prettylights-syntax-keyword: #ff7b72; --color-prettylights-syntax-string: #a5d6ff; --color-prettylights-syntax-variable: #ffa657; --color-prettylights-syntax-brackethighlighter-unmatched: #f85149; + --color-prettylights-syntax-brackethighlighter-angle: #9198a1; --color-prettylights-syntax-invalid-illegal-text: #f0f6fc; --color-prettylights-syntax-invalid-illegal-bg: #8e1519; --color-prettylights-syntax-carriage-return-text: #f0f6fc; @@ -17,47 +52,55 @@ --color-prettylights-syntax-string-regexp: #7ee787; --color-prettylights-syntax-markup-list: #f2cc60; --color-prettylights-syntax-markup-heading: #1f6feb; - --color-prettylights-syntax-markup-italic: #c9d1d9; - --color-prettylights-syntax-markup-bold: #c9d1d9; + --color-prettylights-syntax-markup-italic: #f0f6fc; + --color-prettylights-syntax-markup-bold: #f0f6fc; --color-prettylights-syntax-markup-deleted-text: #ffdcd7; --color-prettylights-syntax-markup-deleted-bg: #67060c; --color-prettylights-syntax-markup-inserted-text: #aff5b4; --color-prettylights-syntax-markup-inserted-bg: #033a16; --color-prettylights-syntax-markup-changed-text: #ffdfb6; --color-prettylights-syntax-markup-changed-bg: #5a1e02; - --color-prettylights-syntax-markup-ignored-text: #c9d1d9; + --color-prettylights-syntax-markup-ignored-text: #f0f6fc; --color-prettylights-syntax-markup-ignored-bg: #1158c7; --color-prettylights-syntax-meta-diff-range: #d2a8ff; - --color-prettylights-syntax-brackethighlighter-angle: #8b949e; - --color-prettylights-syntax-sublimelinter-gutter-mark: #484f58; - --color-prettylights-syntax-constant-other-reference-link: #a5d6ff; - --color-fg-default: #c9d1d9; - --color-fg-muted: #8b949e; - --color-fg-subtle: #6e7681; - --color-canvas-default: #0d1117; - --color-canvas-subtle: #161b22; - --color-border-default: #30363d; - --color-border-muted: #21262d; - --color-neutral-muted: rgba(110,118,129,0.4); - --color-accent-fg: #58a6ff; - --color-accent-emphasis: #1f6feb; - --color-attention-subtle: rgba(187,128,9,0.15); - --color-danger-fg: #f85149; + --color-prettylights-syntax-sublimelinter-gutter-mark: #3d444d; } } - @media (prefers-color-scheme: light) { - .markdown-body { + .markdown-body, [data-theme="light"] { + /* light */ color-scheme: light; - --color-prettylights-syntax-comment: #6e7781; + --focus-outlineColor: #0969da; + --fgColor-default: #1f2328; + --fgColor-muted: #59636e; + --fgColor-accent: #0969da; + --fgColor-success: #1a7f37; + --fgColor-attention: #9a6700; + --fgColor-danger: #d1242f; + --fgColor-done: #8250df; + --bgColor-default: #ffffff; + --bgColor-muted: #f6f8fa; + --bgColor-neutral-muted: #818b981f; + --bgColor-attention-muted: #fff8c5; + --borderColor-default: #d1d9e0; + --borderColor-muted: #d1d9e0b3; + --borderColor-neutral-muted: #d1d9e0b3; + --borderColor-accent-emphasis: #0969da; + --borderColor-success-emphasis: #1a7f37; + --borderColor-attention-emphasis: #9a6700; + --borderColor-danger-emphasis: #cf222e; + --borderColor-done-emphasis: #8250df; + --color-prettylights-syntax-comment: #59636e; --color-prettylights-syntax-constant: #0550ae; - --color-prettylights-syntax-entity: #8250df; - --color-prettylights-syntax-storage-modifier-import: #24292f; - --color-prettylights-syntax-entity-tag: #116329; + --color-prettylights-syntax-constant-other-reference-link: #0a3069; + --color-prettylights-syntax-entity: #6639ba; + --color-prettylights-syntax-storage-modifier-import: #1f2328; + --color-prettylights-syntax-entity-tag: #0550ae; --color-prettylights-syntax-keyword: #cf222e; --color-prettylights-syntax-string: #0a3069; --color-prettylights-syntax-variable: #953800; --color-prettylights-syntax-brackethighlighter-unmatched: #82071e; + --color-prettylights-syntax-brackethighlighter-angle: #59636e; --color-prettylights-syntax-invalid-illegal-text: #f6f8fa; --color-prettylights-syntax-invalid-illegal-bg: #82071e; --color-prettylights-syntax-carriage-return-text: #f6f8fa; @@ -65,32 +108,18 @@ --color-prettylights-syntax-string-regexp: #116329; --color-prettylights-syntax-markup-list: #3b2300; --color-prettylights-syntax-markup-heading: #0550ae; - --color-prettylights-syntax-markup-italic: #24292f; - --color-prettylights-syntax-markup-bold: #24292f; + --color-prettylights-syntax-markup-italic: #1f2328; + --color-prettylights-syntax-markup-bold: #1f2328; --color-prettylights-syntax-markup-deleted-text: #82071e; --color-prettylights-syntax-markup-deleted-bg: #ffebe9; --color-prettylights-syntax-markup-inserted-text: #116329; --color-prettylights-syntax-markup-inserted-bg: #dafbe1; --color-prettylights-syntax-markup-changed-text: #953800; --color-prettylights-syntax-markup-changed-bg: #ffd8b5; - --color-prettylights-syntax-markup-ignored-text: #eaeef2; + --color-prettylights-syntax-markup-ignored-text: #d1d9e0; --color-prettylights-syntax-markup-ignored-bg: #0550ae; --color-prettylights-syntax-meta-diff-range: #8250df; - --color-prettylights-syntax-brackethighlighter-angle: #57606a; - --color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f; - --color-prettylights-syntax-constant-other-reference-link: #0a3069; - --color-fg-default: #24292f; - --color-fg-muted: #57606a; - --color-fg-subtle: #6e7781; - --color-canvas-default: #ffffff; - --color-canvas-subtle: #f6f8fa; - --color-border-default: #d0d7de; - --color-border-muted: hsla(210,18%,87%,1); - --color-neutral-muted: rgba(175,184,193,0.2); - --color-accent-fg: #0969da; - --color-accent-emphasis: #0969da; - --color-attention-subtle: #fff8c5; - --color-danger-fg: #cf222e; + --color-prettylights-syntax-sublimelinter-gutter-mark: #818b98; } } @@ -98,8 +127,8 @@ -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; margin: 0; - color: var(--color-fg-default); - background-color: var(--color-canvas-default); + 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; line-height: 1.5; @@ -143,12 +172,13 @@ .markdown-body a { background-color: transparent; - color: var(--color-accent-fg); + color: var(--fgColor-accent); text-decoration: none; } .markdown-body abbr[title] { border-bottom: none; + -webkit-text-decoration: underline dotted; text-decoration: underline dotted; } @@ -166,12 +196,12 @@ font-weight: var(--base-text-weight-semibold, 600); padding-bottom: .3em; font-size: 2em; - border-bottom: 1px solid var(--color-border-muted); + border-bottom: 1px solid var(--borderColor-muted); } .markdown-body mark { - background-color: var(--color-attention-subtle); - color: var(--color-fg-default); + background-color: var(--bgColor-attention-muted); + color: var(--fgColor-default); } .markdown-body small { @@ -198,7 +228,6 @@ border-style: none; max-width: 100%; box-sizing: content-box; - background-color: var(--color-canvas-default); } .markdown-body code, @@ -210,18 +239,18 @@ } .markdown-body figure { - margin: 1em 40px; + margin: 1em var(--base-size-40); } .markdown-body hr { box-sizing: content-box; overflow: hidden; background: transparent; - border-bottom: 1px solid var(--color-border-muted); + border-bottom: 1px solid var(--borderColor-muted); height: .25em; padding: 0; - margin: 24px 0; - background-color: var(--color-border-default); + margin: var(--base-size-24) 0; + background-color: var(--borderColor-default); border: 0; } @@ -238,6 +267,7 @@ .markdown-body [type=reset], .markdown-body [type=submit] { -webkit-appearance: button; + appearance: button; } .markdown-body [type=checkbox], @@ -254,6 +284,7 @@ .markdown-body [type=search]::-webkit-search-cancel-button, .markdown-body [type=search]::-webkit-search-decoration { -webkit-appearance: none; + appearance: none; } .markdown-body ::-webkit-input-placeholder { @@ -263,6 +294,7 @@ .markdown-body ::-webkit-file-upload-button { -webkit-appearance: button; + appearance: button; font: inherit; } @@ -271,7 +303,7 @@ } .markdown-body ::placeholder { - color: var(--color-fg-subtle); + color: var(--fgColor-muted); opacity: 1; } @@ -293,6 +325,7 @@ width: max-content; max-width: 100%; overflow: auto; + font-variant: tabular-nums; } .markdown-body td, @@ -304,15 +337,11 @@ cursor: pointer; } -.markdown-body details:not([open])>*:not(summary) { - display: none !important; -} - .markdown-body a:focus, .markdown-body [role=button]:focus, .markdown-body input[type=radio]:focus, .markdown-body input[type=checkbox]:focus { - outline: 2px solid var(--color-accent-fg); + outline: 2px solid var(--focus-outlineColor); outline-offset: -2px; box-shadow: none; } @@ -328,7 +357,7 @@ .markdown-body [role=button]:focus-visible, .markdown-body input[type=radio]:focus-visible, .markdown-body input[type=checkbox]:focus-visible { - outline: 2px solid var(--color-accent-fg); + outline: 2px solid var(--focus-outlineColor); outline-offset: -2px; box-shadow: none; } @@ -344,16 +373,16 @@ .markdown-body kbd { display: inline-block; - padding: 3px 5px; - font: 11px ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; + padding: var(--base-size-4); + font: 11px var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace); line-height: 10px; - color: var(--color-fg-default); + color: var(--fgColor-default); vertical-align: middle; - background-color: var(--color-canvas-subtle); - border: solid 1px var(--color-neutral-muted); - border-bottom-color: var(--color-neutral-muted); + background-color: var(--bgColor-muted); + border: solid 1px var(--borderColor-neutral-muted); + border-bottom-color: var(--borderColor-neutral-muted); border-radius: 6px; - box-shadow: inset 0 -1px 0 var(--color-neutral-muted); + box-shadow: inset 0 -1px 0 var(--borderColor-neutral-muted); } .markdown-body h1, @@ -362,8 +391,8 @@ .markdown-body h4, .markdown-body h5, .markdown-body h6 { - margin-top: 24px; - margin-bottom: 16px; + margin-top: var(--base-size-24); + margin-bottom: var(--base-size-16); font-weight: var(--base-text-weight-semibold, 600); line-height: 1.25; } @@ -372,7 +401,7 @@ font-weight: var(--base-text-weight-semibold, 600); padding-bottom: .3em; font-size: 1.5em; - border-bottom: 1px solid var(--color-border-muted); + border-bottom: 1px solid var(--borderColor-muted); } .markdown-body h3 { @@ -393,7 +422,7 @@ .markdown-body h6 { font-weight: var(--base-text-weight-semibold, 600); font-size: .85em; - color: var(--color-fg-muted); + color: var(--fgColor-muted); } .markdown-body p { @@ -404,8 +433,8 @@ .markdown-body blockquote { margin: 0; padding: 0 1em; - color: var(--color-fg-muted); - border-left: .25em solid var(--color-border-default); + color: var(--fgColor-muted); + border-left: .25em solid var(--borderColor-default); } .markdown-body ul, @@ -434,14 +463,14 @@ .markdown-body tt, .markdown-body code, .markdown-body samp { - font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; + font-family: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace); font-size: 12px; } .markdown-body pre { margin-top: 0; margin-bottom: 0; - font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; + font-family: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace); font-size: 12px; word-wrap: normal; } @@ -456,10 +485,13 @@ .markdown-body input::-webkit-outer-spin-button, .markdown-body input::-webkit-inner-spin-button { margin: 0; - -webkit-appearance: none; appearance: none; } +.markdown-body .mr-2 { + margin-right: var(--base-size-8, 8px) !important; +} + .markdown-body::before { display: table; content: ""; @@ -485,12 +517,12 @@ } .markdown-body .absent { - color: var(--color-danger-fg); + color: var(--fgColor-danger); } .markdown-body .anchor { float: left; - padding-right: 4px; + padding-right: var(--base-size-4); margin-left: -20px; line-height: 1; } @@ -508,7 +540,7 @@ .markdown-body pre, .markdown-body details { margin-top: 0; - margin-bottom: 16px; + margin-bottom: var(--base-size-16); } .markdown-body blockquote>:first-child { @@ -525,7 +557,7 @@ .markdown-body h4 .octicon-link, .markdown-body h5 .octicon-link, .markdown-body h6 .octicon-link { - color: var(--color-fg-default); + color: var(--fgColor-default); vertical-align: middle; visibility: hidden; } @@ -594,19 +626,19 @@ list-style-type: none; } -.markdown-body ol[type=a] { +.markdown-body ol[type="a s"] { list-style-type: lower-alpha; } -.markdown-body ol[type=A] { +.markdown-body ol[type="A s"] { list-style-type: upper-alpha; } -.markdown-body ol[type=i] { +.markdown-body ol[type="i s"] { list-style-type: lower-roman; } -.markdown-body ol[type=I] { +.markdown-body ol[type="I s"] { list-style-type: upper-roman; } @@ -627,7 +659,7 @@ } .markdown-body li>p { - margin-top: 16px; + margin-top: var(--base-size-16); } .markdown-body li+li { @@ -640,15 +672,15 @@ .markdown-body dl dt { padding: 0; - margin-top: 16px; + margin-top: var(--base-size-16); font-size: 1em; font-style: italic; font-weight: var(--base-text-weight-semibold, 600); } .markdown-body dl dd { - padding: 0 16px; - margin-bottom: 16px; + padding: 0 var(--base-size-16); + margin-bottom: var(--base-size-16); } .markdown-body table th { @@ -658,16 +690,20 @@ .markdown-body table th, .markdown-body table td { padding: 6px 13px; - border: 1px solid var(--color-border-default); + border: 1px solid var(--borderColor-default); +} + +.markdown-body table td>:last-child { + margin-bottom: 0; } .markdown-body table tr { - background-color: var(--color-canvas-default); - border-top: 1px solid var(--color-border-muted); + background-color: var(--bgColor-default); + border-top: 1px solid var(--borderColor-muted); } .markdown-body table tr:nth-child(2n) { - background-color: var(--color-canvas-subtle); + background-color: var(--bgColor-muted); } .markdown-body table img { @@ -700,7 +736,7 @@ padding: 7px; margin: 13px 0 0; overflow: hidden; - border: 1px solid var(--color-border-default); + border: 1px solid var(--borderColor-default); } .markdown-body span.frame span img { @@ -712,7 +748,7 @@ display: block; padding: 5px 0 0; clear: both; - color: var(--color-fg-default); + color: var(--fgColor-default); } .markdown-body span.align-center { @@ -782,7 +818,7 @@ margin: 0; font-size: 85%; white-space: break-spaces; - background-color: var(--color-neutral-muted); + background-color: var(--bgColor-neutral-muted); border-radius: 6px; } @@ -813,7 +849,7 @@ } .markdown-body .highlight { - margin-bottom: 16px; + margin-bottom: var(--base-size-16); } .markdown-body .highlight pre { @@ -823,11 +859,12 @@ .markdown-body .highlight pre, .markdown-body pre { - padding: 16px; + padding: var(--base-size-16); overflow: auto; font-size: 85%; line-height: 1.45; - background-color: var(--color-canvas-subtle); + color: var(--fgColor-default); + background-color: var(--bgColor-muted); border-radius: 6px; } @@ -855,9 +892,9 @@ } .markdown-body .csv-data .blob-num { - padding: 10px 8px 9px; + padding: 10px var(--base-size-8) 9px; text-align: right; - background: var(--color-canvas-default); + background: var(--bgColor-default); border: 0; } @@ -867,7 +904,7 @@ .markdown-body .csv-data th { font-weight: var(--base-text-weight-semibold, 600); - background: var(--color-canvas-subtle); + background: var(--bgColor-muted); border-top: 0; } @@ -881,18 +918,18 @@ .markdown-body .footnotes { font-size: 12px; - color: var(--color-fg-muted); - border-top: 1px solid var(--color-border-default); + color: var(--fgColor-muted); + border-top: 1px solid var(--borderColor-default); } .markdown-body .footnotes ol { - padding-left: 16px; + padding-left: var(--base-size-16); } .markdown-body .footnotes ol ul { display: inline-block; - padding-left: 16px; - margin-top: 16px; + padding-left: var(--base-size-16); + margin-top: var(--base-size-16); } .markdown-body .footnotes li { @@ -901,24 +938,28 @@ .markdown-body .footnotes li:target::before { position: absolute; - top: -8px; - right: -8px; - bottom: -8px; - left: -24px; + top: calc(var(--base-size-8)*-1); + right: calc(var(--base-size-8)*-1); + bottom: calc(var(--base-size-8)*-1); + left: calc(var(--base-size-24)*-1); pointer-events: none; content: ""; - border: 2px solid var(--color-accent-emphasis); + border: 2px solid var(--borderColor-accent-emphasis); border-radius: 6px; } .markdown-body .footnotes li:target { - color: var(--color-fg-default); + color: var(--fgColor-default); } .markdown-body .footnotes .data-footnote-backref g-emoji { font-family: monospace; } +.markdown-body body:has(:modal) { + padding-right: var(--dialog-scrollgutter) !important; +} + .markdown-body .pl-c { color: var(--color-prettylights-syntax-comment); } @@ -1039,6 +1080,20 @@ color: var(--color-prettylights-syntax-constant-other-reference-link); } +.markdown-body [role=button]:focus:not(:focus-visible), +.markdown-body [role=tabpanel][tabindex="0"]:focus:not(:focus-visible), +.markdown-body button:focus:not(:focus-visible), +.markdown-body summary:focus:not(:focus-visible), +.markdown-body a:focus:not(:focus-visible) { + outline: none; + box-shadow: none; +} + +.markdown-body [tabindex="0"]:focus:not(:focus-visible), +.markdown-body details-dialog:focus:not(:focus-visible) { + outline: none; +} + .markdown-body g-emoji { display: inline-block; min-width: 1ch; @@ -1068,7 +1123,7 @@ } .markdown-body .task-list-item+.task-list-item { - margin-top: 4px; + margin-top: var(--base-size-4); } .markdown-body .task-list-item .handle { @@ -1080,12 +1135,12 @@ vertical-align: middle; } -.markdown-body .contains-task-list:dir(rtl) .task-list-item-checkbox { +.markdown-body ul:dir(rtl) .task-list-item-checkbox { margin: 0 -1.6em .25em .2em; } -.markdown-body .contains-task-list { - position: relative; +.markdown-body ol:dir(rtl) .task-list-item-checkbox { + margin: 0 -1.6em .25em .2em; } .markdown-body .contains-task-list:hover .task-list-item-convert-container, @@ -1100,3 +1155,74 @@ .markdown-body ::-webkit-calendar-picker-indicator { filter: invert(50%); } + +.markdown-body .markdown-alert { + padding: var(--base-size-8) var(--base-size-16); + margin-bottom: var(--base-size-16); + color: inherit; + border-left: .25em solid var(--borderColor-default); +} + +.markdown-body .markdown-alert>:first-child { + margin-top: 0; +} + +.markdown-body .markdown-alert>:last-child { + margin-bottom: 0; +} + +.markdown-body .markdown-alert .markdown-alert-title { + display: flex; + font-weight: var(--base-text-weight-medium, 500); + align-items: center; + line-height: 1; +} + +.markdown-body .markdown-alert.markdown-alert-note { + border-left-color: var(--borderColor-accent-emphasis); +} + +.markdown-body .markdown-alert.markdown-alert-note .markdown-alert-title { + color: var(--fgColor-accent); +} + +.markdown-body .markdown-alert.markdown-alert-important { + border-left-color: var(--borderColor-done-emphasis); +} + +.markdown-body .markdown-alert.markdown-alert-important .markdown-alert-title { + color: var(--fgColor-done); +} + +.markdown-body .markdown-alert.markdown-alert-warning { + border-left-color: var(--borderColor-attention-emphasis); +} + +.markdown-body .markdown-alert.markdown-alert-warning .markdown-alert-title { + color: var(--fgColor-attention); +} + +.markdown-body .markdown-alert.markdown-alert-tip { + border-left-color: var(--borderColor-success-emphasis); +} + +.markdown-body .markdown-alert.markdown-alert-tip .markdown-alert-title { + color: var(--fgColor-success); +} + +.markdown-body .markdown-alert.markdown-alert-caution { + border-left-color: var(--borderColor-danger-emphasis); +} + +.markdown-body .markdown-alert.markdown-alert-caution .markdown-alert-title { + color: var(--fgColor-danger); +} + +.markdown-body>*:first-child>.heading-element:first-child { + margin-top: 0 !important; +} + +.markdown-body .highlight pre:has(+.zeroclipboard-container) { + min-height: 52px; +} + diff --git a/package.json b/package.json index 54b3adc..67150e3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "github-markdown-css", - "version": "5.2.0", + "version": "5.8.1", "description": "The minimal amount of CSS to replicate the GitHub Markdown style", "license": "MIT", "repository": "sindresorhus/github-markdown-css", @@ -11,10 +11,13 @@ "url": "https://sindresorhus.com" }, "main": "github-markdown.css", + "engines": { + "node": ">=10" + }, "scripts": { - "make:light": "github-markdown-css --type light > github-markdown-light.css", - "make:dark": "github-markdown-css --type dark > github-markdown-dark.css", - "make:auto": "github-markdown-css --type auto > github-markdown.css", + "make:light": "github-markdown-css --no-use-fixture --type light > github-markdown-light.css", + "make:dark": "github-markdown-css --no-use-fixture --type dark > github-markdown-dark.css", + "make:auto": "github-markdown-css --no-use-fixture --type auto > github-markdown.css", "make": "npm run make:light && npm run make:dark && npm run make:auto" }, "files": [ @@ -32,6 +35,6 @@ "stylesheet" ], "devDependencies": { - "generate-github-markdown-css": "^5.0.2" + "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.