diff --git a/astro.config.ts b/astro.config.ts index a5763be..cfec0d1 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -71,8 +71,8 @@ export default defineConfig({ shikiConfig: { // available themes: https://shiki.style/themes themes: { - light: 'one-light', - dark: 'one-dark-pro', + light: 'github-light', + dark: 'github-dark', }, }, }, diff --git a/src/styles/heti.css b/src/styles/heti.css index 6ccb24f..d1c7bf5 100644 --- a/src/styles/heti.css +++ b/src/styles/heti.css @@ -50,7 +50,7 @@ --at-apply: 'overflow-auto whitespace-pre scrollbar-hidden'; } .heti pre code { - --at-apply: 'mx-0 bg-secondary/0 tracking-0'; + --at-apply: 'p-0 bg-secondary/0 tracking-0'; } html.dark .heti pre span { --at-apply: 'text-[var(--shiki-dark)]!'; @@ -58,7 +58,7 @@ html.dark .heti pre span { /* 代码 */ .heti code { - --at-apply: 'mx-1 bg-secondary/5 rounded text-0.875em'; + --at-apply: 'px-1 py-0.5 bg-secondary/5 rounded text-0.875em'; } /* 分割线 */ @@ -124,11 +124,8 @@ html.dark .heti mark { /* 键盘输入文本 */ .heti kbd { - --at-apply: 'bg-secondary/5 rounded-0.75 border border-solid border-secondary/40 text-secondary'; - --at-apply: 'inline-block text-0.85em font-bold leading-none px-1 py-0.5 whitespace-nowrap'; - box-shadow: - 0 1px 1px color-mix(in oklch, var(--uno-colors-secondary) 25%, transparent), - 0 2px 0 0 var(--uno-colors-background) inset; + --at-apply: 'bg-secondary/5 rounded border border-solid border-secondary/40 text-secondary'; + --at-apply: 'inline-block text-0.85em font-bold leading-none px-1 py-0.75 whitespace-nowrap'; } /* 上标和下标 */ @@ -155,6 +152,47 @@ html.dark .heti sup a:target { --at-apply: 'bg-#4d4a00e0'; } +/* 列表 */ +.heti ul, +.heti ol, +.heti dl { + --at-apply: 'mt-3 mb-6'; +} +.heti ul, +.heti ol { + --at-apply: 'pl-8'; +} +.heti ul ul, +.heti ul ol, +.heti ol ul, +.heti ol ol { + --at-apply: 'my-0'; +} +.heti ul { + --at-apply: 'list-disc'; +} +.heti ol { + --at-apply: 'list-decimal'; +} +.heti ul ul, +.heti ol ul { + --at-apply: 'list-circle'; +} +.heti ul ul ul, +.heti ul ol ul, +.heti ol ul ul, +.heti ol ol ul { + --at-apply: 'list-square'; +} +.heti li { + --at-apply: 'list-unset'; +} + +/* 表格 */ +.heti table { + --at-apply: 'box-border table-fixed mt-3 mb-6 border-collapse border border-solid border-secondary/25 break-words'; +} + .heti figure { display: block; text-align: center; @@ -168,65 +206,9 @@ html.dark .heti sup a:target { .heti abbr { letter-spacing: normal; } - -.heti ul, -.heti ol, -.heti dl { - margin-block-start: 12px; - margin-block-end: 24px; -} -.heti ul, -.heti ol { - padding-inline-start: 32px; -} -.heti ul ul, -.heti ul ol, -.heti ol ul, -.heti ol ol { - margin-block-start: 0; - margin-block-end: 0; -} -.heti ul { - list-style-type: disc; -} -.heti ol { - list-style-type: decimal; -} -.heti ul ul, -.heti ol ul { - list-style-type: circle; -} -.heti ul ul ul, -.heti ul ol ul, -.heti ol ul ul, -.heti ol ol ul { - list-style-type: square; -} -.heti li { - list-style-type: unset; -} -.heti table { - box-sizing: border-box; - table-layout: fixed; - margin-block-start: 12px; - margin-block-end: 24px; - margin-inline-start: auto; - margin-inline-end: auto; - border-collapse: collapse; - border-width: 1px; - border-style: solid; - border-color: #ccc; - word-break: break-word; -} .heti th, .heti td { - padding-block-start: 6px; - padding-block-end: 6px; - padding-inline-start: 8px; - padding-inline-end: 8px; - border-width: 1px; - border-style: solid; - border-color: #ccc; + --at-apply: 'px-2 py-1.5 border border-solid border-secondary/25'; } .heti caption { caption-side: bottom;