refactor(styles): rename style folder to styles

This commit is contained in:
cfngc4594 2025-04-04 13:00:36 +08:00
parent 30fd6fd386
commit d61f3d9b0c
3 changed files with 51 additions and 2 deletions

View File

@ -1,4 +1,4 @@
import "@/style/mdx.css";
import "@/styles/mdx.css";
import { cn } from "@/lib/utils";
import { Suspense } from "react";
import "katex/dist/katex.min.css";

View File

@ -1,6 +1,6 @@
"use client";
import "@/style/mdx.css";
import "@/styles/mdx.css";
import { cn } from "@/lib/utils";
import "katex/dist/katex.min.css";
import remarkGfm from "remark-gfm";

49
src/styles/mdx.css Normal file
View File

@ -0,0 +1,49 @@
[data-rehype-pretty-code-figure] pre {
@apply px-0;
}
[data-rehype-pretty-code-figure] code {
@apply text-sm !leading-loose md:text-base border-0 p-0;
}
[data-rehype-pretty-code-figure] code[data-line-numbers] {
counter-reset: line;
}
[data-rehype-pretty-code-figure] code[data-line-numbers]>[data-line]::before {
counter-increment: line;
content: counter(line);
@apply mr-4 inline-block w-4 text-right text-gray-500;
}
[data-rehype-pretty-code-figure] [data-line] {
@apply border-l-2 border-l-transparent px-3;
}
[data-rehype-pretty-code-figure] [data-highlighted-line] {
background: rgba(219, 234, 254, 0.5);
@apply border-l-blue-400;
}
.dark [data-rehype-pretty-code-figure] [data-highlighted-line] {
background: rgba(200, 200, 255, 0.1);
@apply border-l-blue-400;
}
[data-rehype-pretty-code-figure] [data-highlighted-chars] {
@apply rounded bg-zinc-400/50;
box-shadow: 0 0 0 4px rgb(161 161 170 / 0.5);
}
.dark [data-rehype-pretty-code-figure] [data-highlighted-chars] {
@apply rounded bg-zinc-500/50;
box-shadow: 0 0 0 4px rgb(113 113 122 / 0.5);
}
[data-rehype-pretty-code-figure] [data-chars-id] {
@apply border-b-2 p-1 shadow-none;
}
.subheading-anchor {
@apply no-underline hover:underline;
}