docs: fix styling of code elements in headers (#14440)

This commit is contained in:
Shahed Nasser
2026-01-05 12:49:58 +02:00
committed by GitHub
parent e63d0ca3cf
commit 4bc15b4dc4
3 changed files with 3 additions and 3 deletions

View File

@@ -10,7 +10,7 @@ export const H1 = ({ className, ...props }: H1Props) => {
<div className="flex items-start justify-between gap-2 h1-wrapper">
<h1
className={clsx(
"text-h1 [&_code]:!text-h1 [&_code]:!font-mono mb-docs_1 text-medusa-fg-base",
"text-h1 [&>code]:!text-h1 [&>code]:!font-mono mb-docs_1 text-medusa-fg-base",
props.id && "scroll-m-docs_7",
className
)}

View File

@@ -21,7 +21,7 @@ export const H2 = ({ className, children, passRef, ...props }: H2Props) => {
return (
<h2
className={clsx(
"text-h2 [&_code]:!text-h2 [&_code]:!font-mono mb-docs_1 mt-docs_2 text-medusa-fg-base",
"text-h2 [&>code]:!text-h2 [&>code]:!font-mono mb-docs_1 mt-docs_2 text-medusa-fg-base",
props.id && [
"group/h2",
showCollapsedNavbar && "scroll-m-docs_7",

View File

@@ -17,7 +17,7 @@ export const H3 = ({ className, children, ...props }: H3Props) => {
return (
<h3
className={clsx(
"text-h3 [&_code]:!text-h3 [&_code]:!font-mono my-docs_1 text-medusa-fg-base",
"text-h3 [&>code]:!text-h3 [&>code]:!font-mono my-docs_1 text-medusa-fg-base",
props.id && [
"group/h3",
showCollapsedNavbar && "scroll-m-docs_7",