Skip to content

Commit

Permalink
Merge pull request #1435 from appwrite/feat-improve-table-density-in-…
Browse files Browse the repository at this point in the history
…docs

Improve table density in docs
  • Loading branch information
thejessewinton authored Nov 8, 2024
2 parents 2f6d603 + cf2eeed commit 8440a20
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
11 changes: 11 additions & 0 deletions src/markdoc/nodes/Code.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,14 @@
</script>

<span class="web-inline-code web-code">{content}</span>

<style>
.web-inline-code {
font-size: 0.75rem;
line-height: 1.25rem;
@media (min-width: 1024px) {
margin-left: 0.5rem;
}
}
</style>
3 changes: 0 additions & 3 deletions src/markdoc/nodes/Link.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script lang="ts">
import { isInDocs } from '$lib/layouts/Docs.svelte';
import { isInChangelog } from '$markdoc/layouts/Changelog.svelte';
export let href: string;
Expand All @@ -9,11 +8,9 @@
const target = isExternal ? '_blank' : undefined;
const rel = isExternal ? 'noopener nofollow' : undefined;
const inDocs = isInDocs();
const inChangelog = isInChangelog();
$: classes = (() => {
if (inDocs) return 'text-paragraph-md';
if (inChangelog) return 'text-paragraph-lg in-changelog';
return '';
})();
Expand Down
2 changes: 1 addition & 1 deletion src/markdoc/nodes/Td.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
export let rowspan: HTMLTdAttributes['rowspan'] = undefined;
</script>

<td class="web-table-col" {align} {colspan} {rowspan}>
<td class="py-[0.5625rem] px-3 text-sm leading-[1.375rem]" {align} {colspan} {rowspan}>
<slot />
</td>
4 changes: 2 additions & 2 deletions src/markdoc/nodes/Th.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
style:width={width ? `${width}px` : undefined}
style:min-inline-size={width ? 'unset' : undefined}
role="columnheader"
class="web-table-head-col"
class="py-[0.5625rem] px-3"
{align}
>
<span class="text-micro uppercase">
<span class="text-sm leading-[1.375rem] text-[hsl(var(--web-color-primary))]">
<slot />
</span>
</td>

0 comments on commit 8440a20

Please sign in to comment.