Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use prose for margins #348

Merged
merged 6 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/docs/src/app/[...slug]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function DocumentLayoutProps({
}

return (
<div className="gi-layout-container-full-width flex flex-row gap-4 lg:gap-6 py-6 lg:py-8">
<div className="gi-layout-container-full-width flex flex-row gap-4 lg:gap-6 py-6 lg:py-8 content-stretch">
<SideNavigationConnected />
{children}
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/src/app/[...slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function DocumentPage({ params }: DocumentPageProps) {

return (
<>
<div className="w-full flex-auto">
<div className="w-full flex-auto prose max-w-none">
{document.status !== 'stable' && (
<div className="flex justify-between items-center py-2">
{document.status === 'in-review' && (
Expand Down
32 changes: 0 additions & 32 deletions apps/docs/src/components/document/common/mdx.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,38 +97,6 @@ export type MdxProps = {
};

const standardComponents: MDXComponents = {
h1: ({ children, id }) => (
<Heading as="h1" id={id}>
{children}
</Heading>
),
h2: ({ children, id }) => (
<Heading as="h2" id={id}>
{children}
</Heading>
),
h3: ({ children, id }) => (
<Heading as="h3" id={id}>
{children}
</Heading>
),
h4: ({ children, id }) => (
<Heading as="h4" id={id}>
{children}
</Heading>
),
h5: ({ children, id }) => (
<Heading as="h5" id={id}>
{children}
</Heading>
),
h6: ({ children, id }) => (
<Heading as="h6" id={id}>
{children}
</Heading>
),
p: ({ children }) => <Paragraph>{children}</Paragraph>,
span: ({ children }) => <Paragraph as="span">{children}</Paragraph>,
a: ({ children, href }) =>
href ? <Link href={href}>{children}</Link> : null,
ul: ({ children }) => <ul className="gi-list-bullet">{children}</ul>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export function ComponentStatusBlock({ componentId }: { componentId: string }) {
throw new Error(`Component status not found '${componentId}'.`);
}
return (
<table className="table-fixed">
<table className="table-fixed max-w-prose">
<tbody>
<tr>
<td className="p-2">Figma Library</td>
Expand Down
112 changes: 84 additions & 28 deletions packages/design/tailwind/src/create-theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,37 +305,51 @@ export function createTheme(
p: {
font: variables.semantic.typography.default.text.md,
fontWeight: variables.primitive.font.weight['400'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-bottom': '2em',
'max-width': '65ch',
},
h1: {
font: variables.semantic.typography.default.heading.xl,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h2: {
font: variables.semantic.typography.default.heading.lg,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h3: {
font: variables.semantic.typography.default.heading.md,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h4: {
font: variables.semantic.typography.default.heading.sm,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h5: {
font: variables.semantic.typography.default.heading.xs,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h6: {
font: variables.semantic.typography.default.heading.xs,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
},
},
Expand All @@ -344,37 +358,51 @@ export function createTheme(
p: {
font: variables.semantic.typography.xs.text.md,
fontWeight: variables.primitive.font.weight['400'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-bottom': '2em',
'max-width': '65ch',
},
h1: {
font: variables.semantic.typography.xs.heading.xl,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h2: {
font: variables.semantic.typography.xs.heading.lg,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h3: {
font: variables.semantic.typography.xs.heading.md,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h4: {
font: variables.semantic.typography.xs.heading.sm,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h5: {
font: variables.semantic.typography.xs.heading.xs,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h6: {
font: variables.semantic.typography.xs.heading['2xs'],
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
},
},
Expand All @@ -383,37 +411,51 @@ export function createTheme(
p: {
font: variables.semantic.typography.md.text.md,
fontWeight: variables.primitive.font.weight['400'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-bottom': '2em',
'max-width': '65ch',
},
h1: {
font: variables.semantic.typography.md.heading.xl,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h2: {
font: variables.semantic.typography.md.heading.lg,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h3: {
font: variables.semantic.typography.md.heading.md,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h4: {
font: variables.semantic.typography.md.heading.sm,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h5: {
font: variables.semantic.typography.md.heading.xs,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h6: {
font: variables.semantic.typography.md.heading['2xs'],
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
},
},
Expand All @@ -422,37 +464,51 @@ export function createTheme(
p: {
font: variables.semantic.typography.xl.text.md,
fontWeight: variables.primitive.font.weight['400'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-bottom': '2em',
'max-width': '65ch',
},
h1: {
font: variables.semantic.typography.xl.heading.xl,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h2: {
font: variables.semantic.typography.xl.heading.lg,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h3: {
font: variables.semantic.typography.xl.heading.md,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h4: {
font: variables.semantic.typography.xl.heading.sm,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h5: {
font: variables.semantic.typography.xl.heading.xs,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h6: {
font: variables.semantic.typography.xl.heading['2xs'],
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
},
},
Expand Down
Loading