Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

more styling

Joshen Lim200800e98552
diff --git a/apps/temp-docs/components/CodeBlock/CodeBlock.tsx b/apps/temp-docs/components/CodeBlock/CodeBlock.tsx
index ea545d4f1b7..bf3792274c0 100644
--- a/apps/temp-docs/components/CodeBlock/CodeBlock.tsx
+++ b/apps/temp-docs/components/CodeBlock/CodeBlock.tsx
@@ -56,15 +56,12 @@ function CodeBlock(props: Props) {
<SyntaxHighlighter
language={lang}
style={monokaiTheme}
- className={`code-block rounded-lg border p-4 ${!showLineNumbers && 'pl-6'}`}
+ className={`code-block rounded-lg border p-4 !my-2 !bg-scale-400 ${
+ !showLineNumbers && 'pl-6'
+ }`}
customStyle={{
fontSize: large ? 18 : 12,
lineHeight: large ? 1.4 : 1.2,
- // borderTop: '1px solid #393939',
- //background: isDarkMode ? 'bg-scale-700' : 'bg-scale-300',
- //background: isDarkMode ? '#444' : '#F1F3F5',
- // we really should support proper light mode, not just show dark in both modes
- background: isDarkMode ? '#444' : '#F1F3F5',
}}
showLineNumbers={showLineNumbers}
lineNumberContainerStyle={{
@@ -72,7 +69,6 @@ function CodeBlock(props: Props) {
}}
lineNumberStyle={{
minWidth: '44px',
- background: isDarkMode ? '#444' : '#F1F3F5',
paddingLeft: '4px',
paddingRight: '4px',
marginRight: '12px',
diff --git a/apps/temp-docs/generator/legacy.ts b/apps/temp-docs/generator/legacy.ts
index 26a4fb071bf..e3d6130be4f 100644
--- a/apps/temp-docs/generator/legacy.ts
+++ b/apps/temp-docs/generator/legacy.ts
@@ -146,23 +146,21 @@ const mergeUnion = (paramDefinition: TsDoc.TypeDefinition) => {
}
const methodListGroup = (items) => `
-<ul className="method-list-group p-0 m-0 list-none">
+<ul className="method-list-group">
${items}
</ul>
`
const methodListItemLabel = ({ name, isOptional, type, description }, subContent) => `
-<li className="method-list-item border-t border-gray-300">
- <h4 className="method-list-item-label flex items-center gap-1">
- <span className="method-list-item-label-name font-mono font-bold text-sm py-2">
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
${name}
</span>
- <span className="method-list-item-label-badge font-mono text-xs px-1 ${
- !isOptional && 'required'
- }">
+ <span className="method-list-item-label-badge ${!isOptional && 'required'}">
${isOptional ? 'optional' : 'required'}
</span>
- <span className="method-list-item-validation flex flex-wrap gap-2">
+ <span className="method-list-item-validation">
${type}
</span>
</h4>
diff --git a/apps/temp-docs/generator/legacy/components/Page.ts b/apps/temp-docs/generator/legacy/components/Page.ts
index e9fc92e0602..7f1b1b5b05a 100644
--- a/apps/temp-docs/generator/legacy/components/Page.ts
+++ b/apps/temp-docs/generator/legacy/components/Page.ts
@@ -33,8 +33,7 @@ slug: ${slug}
custom_edit_url: ${specFileName}
---
-import Tabs from '@theme/Tabs';
-import TabItem from '@theme/TabItem';
+${title ? `# ${title}` : ''}
${description}
diff --git a/apps/temp-docs/styles/main.scss b/apps/temp-docs/styles/main.scss
index e1f0d7748a1..f934cb363ae 100644
--- a/apps/temp-docs/styles/main.scss
+++ b/apps/temp-docs/styles/main.scss
@@ -82,6 +82,27 @@ pre[class*='language-'] {
// Spec doc specifics ported from docusaurus
// @TODO these should be converted to Tailwind classes
+
+.method-list-item {
+ @apply border-t border-gray-400;
+ .method-list-item-label {
+ @apply flex items-center gap-1;
+ }
+ .method-list-item-label-name {
+ @apply font-mono font-bold text-sm py-2;
+ }
+ .method-list-item-label-badge {
+ @apply font-mono text-xs px-1;
+ overflow-wrap: anywhere;
+ }
+ .method-list-item-validation {
+ @apply flex flex-wrap gap-2;
+ }
+ .method-list-item-description {
+ @apply text-sm space-y-2;
+ }
+}
+
.method-list-group li:last-child {
border-bottom: 1px solid var(--colors-scale3);
}
@@ -93,21 +114,19 @@ pre[class*='language-'] {
}
}
-.method-list-item-label-badge {
- overflow-wrap: anywhere;
-}
-
.method-list-item-validation {
code {
+ @apply text-xs bg-scale-300 rounded;
padding: 1px 6px;
- border-radius: 4px;
- background-color: var(--colors-scale3);
}
}
+.method-list-group {
+ @apply p-0 m-0 list-none;
+}
+
.method-list-group .method-list-group {
- border: 1px solid var(--colors-scale3);
- border-radius: 8px;
+ @apply border border-scale-400 rounded-md;
margin-bottom: 20px;
max-width: 600px;
}
@@ -137,4 +156,4 @@ pre[class*='language-'] {
svg {
transform: rotate(90deg);
}
-}
+}
\ No newline at end of file