diff --git a/apps/documentation/components/PopoutBox.tsx b/apps/documentation/components/PopoutBox.tsx index 2b497fbd..f353cd24 100644 --- a/apps/documentation/components/PopoutBox.tsx +++ b/apps/documentation/components/PopoutBox.tsx @@ -20,30 +20,31 @@ const PopoutBox = ({ return ( ); }; diff --git a/apps/documentation/components/TableOfContents.tsx b/apps/documentation/components/TableOfContents.tsx index d8ddd296..aa46e8d3 100644 --- a/apps/documentation/components/TableOfContents.tsx +++ b/apps/documentation/components/TableOfContents.tsx @@ -34,7 +34,7 @@ const TOCLink = ({ ref={ref} href={`#${node.id}`} className={cn( - 'focusable my-2 block text-base transition-colors hover:text-accent', + 'focusable my-2 block text-base-sm transition-colors hover:text-accent', sideBar && 'm-2 text-sm', node.level === 3 && 'ml-6 font-normal', sideBar && highlighted && 'font-semibold text-accent', diff --git a/apps/documentation/components/article.tsx b/apps/documentation/components/article.tsx index 7e674768..91d624a3 100644 --- a/apps/documentation/components/article.tsx +++ b/apps/documentation/components/article.tsx @@ -28,7 +28,7 @@ export default function Article({ return ( <> -
+
{project} {section && <>🠖 {section}} diff --git a/apps/documentation/components/customComponents/Pre.tsx b/apps/documentation/components/customComponents/Pre.tsx index 480c352a..e00c550f 100644 --- a/apps/documentation/components/customComponents/Pre.tsx +++ b/apps/documentation/components/customComponents/Pre.tsx @@ -7,8 +7,10 @@ type PreProps = React.HTMLAttributes & { const Pre = ({ raw, children, ...props }: PreProps) => { return ( -
-
{children}
+
+
+        {children}
+      
{raw && }
); diff --git a/apps/documentation/package.json b/apps/documentation/package.json index 34e13cbd..b4317994 100644 --- a/apps/documentation/package.json +++ b/apps/documentation/package.json @@ -22,6 +22,7 @@ "@radix-ui/react-navigation-menu": "^1.2.0", "@radix-ui/react-popover": "^1.1.1", "@t3-oss/env-nextjs": "^0.10.1", + "@tailwindcss/container-queries": "^0.1.1", "@vercel/analytics": "^1.3.1", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", diff --git a/apps/documentation/styles/globals.css b/apps/documentation/styles/globals.css index c5ffbb5e..e41ad16b 100644 --- a/apps/documentation/styles/globals.css +++ b/apps/documentation/styles/globals.css @@ -112,7 +112,10 @@ } code { - @apply text-sm; + @apply text-base-sm; + @apply bg-rich-black/10 dark:bg-white/5; + @apply p-[0.2rem]; + @apply rounded-sm; } } diff --git a/apps/documentation/tailwind.config.ts b/apps/documentation/tailwind.config.ts index 86481fe9..c8121580 100644 --- a/apps/documentation/tailwind.config.ts +++ b/apps/documentation/tailwind.config.ts @@ -1,5 +1,6 @@ import type { Config } from 'tailwindcss'; import typography from '@tailwindcss/typography'; +import containers from '@tailwindcss/container-queries'; import sharedConfig from '@codaco/tailwind-config/fresco'; const config: Pick< @@ -15,7 +16,7 @@ const config: Pick< '../../packages/ui/src/**/*.{ts,tsx}', // UI package ], presets: [sharedConfig], - plugins: [typography], + plugins: [typography, containers], }; export default config; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 013ab65f..811a67af 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -195,6 +195,9 @@ importers: '@t3-oss/env-nextjs': specifier: ^0.10.1 version: 0.10.1(typescript@5.5.4)(zod@3.23.8) + '@tailwindcss/container-queries': + specifier: ^0.1.1 + version: 0.1.1(tailwindcss@3.4.10) '@vercel/analytics': specifier: ^1.3.1 version: 1.3.1(next@14.2.5)(react@18.3.1) @@ -3890,6 +3893,14 @@ packages: zod: 3.23.8 dev: false + /@tailwindcss/container-queries@0.1.1(tailwindcss@3.4.10): + resolution: {integrity: sha512-p18dswChx6WnTSaJCSGx6lTmrGzNNvm2FtXmiO6AuA1V4U5REyoqwmT6kgAsIMdjo07QdAfYXHJ4hnMtfHzWgA==} + peerDependencies: + tailwindcss: '>=3.2.0' + dependencies: + tailwindcss: 3.4.10 + dev: false + /@tailwindcss/typography@0.5.14(tailwindcss@3.4.10): resolution: {integrity: sha512-ZvOCjUbsJBjL9CxQBn+VEnFpouzuKhxh2dH8xMIWHILL+HfOYtlAkWcyoon8LlzE53d2Yo6YO6pahKKNW3q1YQ==} peerDependencies: