Skip to content
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
8 changes: 7 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { defineConfig } from "astro/config"
import sitemap from "@astrojs/sitemap"
import mdx from "@astrojs/mdx"
import react from "@astrojs/react" // @ts-check
import responsiveTables from "./src/plugins/responsiveTables.mjs"

// https://astro.build/config
export default defineConfig(
Expand All @@ -21,7 +22,12 @@ export default defineConfig(
markdown: {
syntaxHighlight: false,
// TODO: Add official Shiki integration when line highlighting is supported
remarkPlugins: [myRemarkShiki, youtubeEmbed, responsiveImages],
remarkPlugins: [
myRemarkShiki,
youtubeEmbed,
responsiveImages,
responsiveTables,
],
},
},
)
Expand Down
2 changes: 1 addition & 1 deletion src/blogComponents/cornerShape/CornerShapePlayground.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const styles = {
fontSize: "1.25rem",
},
warningCode: {
backgroundColor: "var(--theme-tangent-code-inline-bg);",
backgroundColor: "var(--theme-tangent-code-inline-bg)",
padding: "0.1em 0.3em",
borderRadius: "0.2em",
fontSize: "0.9em",
Expand Down
2 changes: 1 addition & 1 deletion src/pages/2024-01/next-js-app-router-cache/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -444,4 +444,4 @@ The table below summarizes all four caching mechanisms and their details.
| Data Cache | Stores data across user requests and deployments | Server | Time-based or on-demand revalidation |
| Request Memoization | Re-use values in same render pass for efficiency | Server | N/A, only lasts for the lifetime of a server request |
| Full Route Cache | Caches static routes at build time to improve performance | Server | Revalidated by revalidating Data Cache or redeploying the application |
| Router Cache | Stores navigated routes to optimize navigation epxerience | Client | Automatic invalidation after a specific time or when the data cache is cleared |
| Router Cache | Stores navigated routes to optimize navigation experience | Client | Automatic invalidation after a specific time or when the data cache is cleared |
16 changes: 6 additions & 10 deletions src/pages/2026-05/corner-shape/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ You use `superellipse()` when you want a shape that falls _between_ the named ke
/>

{" "}

<CornerShapeExample
borderRadius="40%"
cornerShape="superellipse(1.5)"
Expand Down Expand Up @@ -319,15 +318,12 @@ The `corner-shape` shorthand also accepts up to four values following the same c
height="100px"
/>

{" "}

<CornerShapeExample
borderRadius="2rem"
cornerShape="round bevel scoop superellipse(4)"
selector=".mixed-shorthand"
height="100px"
/>

<CornerShapeExample
borderRadius="2rem"
cornerShape="round bevel scoop superellipse(4)"
selector=".mixed-shorthand"
height="100px"
/>
</div>

## Interactive Playground
Expand Down
20 changes: 20 additions & 0 deletions src/plugins/responsiveTables.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { visit } from "unist-util-visit"

export default function responsiveTables() {
return transformer
}

function transformer(tree) {
visit(tree, "table", (node, index, parent) => {
const wrapper = {
type: "containerDirective", // or use 'parent' depending on your toolchain
data: {
hName: "div",
hProperties: { className: ["responsive-table"] },
},
children: [node],
}

parent.children[index] = wrapper
})
}
6 changes: 6 additions & 0 deletions src/styles/blog.css
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,16 @@ blockquote .source {
overflow: hidden;
}

.responsive-table {
max-width: 100%;
overflow-x: auto;
}

table {
font-size: 1rem;
border-collapse: collapse;
width: 100%;
overflow-x: auto;
}

thead {
Expand Down
Loading