Skip to content

Commit

Permalink
fix: also add non-h2 header styles
Browse files Browse the repository at this point in the history
  • Loading branch information
llllvvuu committed Aug 7, 2023
1 parent cf4d1ab commit 7db9e87
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion packages/nextra-theme-docs/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,16 @@ input[type='search'] {
}
}

.mdx-header {
@apply nx-font-semibold nx-tracking-tight nx-text-slate-900 dark:nx-text-slate-100;
}

.mdx-h2 {
@apply nx-mt-10 nx-border-b nx-pb-1 nx-text-3xl nx-border-neutral-200/70 contrast-more:nx-border-neutral-400 dark:nx-border-primary-100/10 contrast-more:dark:nx-border-neutral-400;
}

.footnotes > h2 {
@apply mdx-h2;
@apply mdx-header mdx-h2;
}

.footnotes a[data-footnote-backref] {
Expand Down
2 changes: 1 addition & 1 deletion packages/nextra-theme-docs/src/mdx-components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function HeadingLink({
return (
<Tag
className={cn(
'nx-font-semibold nx-tracking-tight nx-text-slate-900 dark:nx-text-slate-100',
'mdx-header',
{
h2: 'mdx-h2',
h3: 'nx-mt-8 nx-text-2xl',
Expand Down

0 comments on commit 7db9e87

Please sign in to comment.