mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-28 08:49:38 +02:00
fix(docs-site): reset code block prose styles
This commit is contained in:
parent
838cf84649
commit
81c7e60fef
2 changed files with 21 additions and 3 deletions
|
|
@ -188,6 +188,24 @@ pre {
|
||||||
border-radius: 0 !important;
|
border-radius: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ktx-code code {
|
||||||
|
display: grid;
|
||||||
|
min-width: max-content;
|
||||||
|
padding: 0 !important;
|
||||||
|
border: 0 !important;
|
||||||
|
border-radius: 0 !important;
|
||||||
|
background: transparent !important;
|
||||||
|
font-size: inherit !important;
|
||||||
|
line-height: inherit !important;
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ktx-code .line {
|
||||||
|
display: block;
|
||||||
|
min-height: 1.7em;
|
||||||
|
padding-inline: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* Neutralize the outer figure styling that our wrapper now owns */
|
/* Neutralize the outer figure styling that our wrapper now owns */
|
||||||
figure:has(> .ktx-code),
|
figure:has(> .ktx-code),
|
||||||
figure[data-rehype-pretty-code-figure]:has(.ktx-code) {
|
figure[data-rehype-pretty-code-figure]:has(.ktx-code) {
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ export function CodeBlock(props: Props) {
|
||||||
// Mode A — Terminal
|
// Mode A — Terminal
|
||||||
if (isTerminal) {
|
if (isTerminal) {
|
||||||
return (
|
return (
|
||||||
<div className="ktx-code ktx-code-terminal group">
|
<div className="not-prose ktx-code ktx-code-terminal group">
|
||||||
<div className="ktx-code-terminal-head">
|
<div className="ktx-code-terminal-head">
|
||||||
<span className="ktx-tl-dot" style={{ background: "#ff5f57" }} />
|
<span className="ktx-tl-dot" style={{ background: "#ff5f57" }} />
|
||||||
<span className="ktx-tl-dot" style={{ background: "#febc2e" }} />
|
<span className="ktx-tl-dot" style={{ background: "#febc2e" }} />
|
||||||
|
|
@ -83,7 +83,7 @@ export function CodeBlock(props: Props) {
|
||||||
// Mode B — VS Code tab (filename present)
|
// Mode B — VS Code tab (filename present)
|
||||||
if (hasTitle) {
|
if (hasTitle) {
|
||||||
return (
|
return (
|
||||||
<div className="ktx-code ktx-code-tab group">
|
<div className="not-prose ktx-code ktx-code-tab group">
|
||||||
<div className="ktx-code-tab-head">
|
<div className="ktx-code-tab-head">
|
||||||
<span className="ktx-file-glyph" data-lang={language ?? ""} />
|
<span className="ktx-file-glyph" data-lang={language ?? ""} />
|
||||||
<span className="ktx-code-tab-filename">{title}</span>
|
<span className="ktx-code-tab-filename">{title}</span>
|
||||||
|
|
@ -99,7 +99,7 @@ export function CodeBlock(props: Props) {
|
||||||
|
|
||||||
// Mode C — Minimal default
|
// Mode C — Minimal default
|
||||||
return (
|
return (
|
||||||
<div className="ktx-code ktx-code-minimal group relative">
|
<div className="not-prose ktx-code ktx-code-minimal group relative">
|
||||||
{language && <span className="ktx-code-minimal-lang">{language}</span>}
|
{language && <span className="ktx-code-minimal-lang">{language}</span>}
|
||||||
<CopyButton text={codeText} className="ktx-code-minimal-copy" />
|
<CopyButton text={codeText} className="ktx-code-minimal-copy" />
|
||||||
<pre {...rest} className="ktx-code-body ktx-code-body-minimal">
|
<pre {...rest} className="ktx-code-body ktx-code-body-minimal">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue