Files
MorphDoc/themes/gov-red-letter/theme.css
T
SkyJourney 83e6559c2c release: 发布 v0.5.1
新增能力:内置 4 套红头、3 套正式文档和 3 套标书主题,支持主题推荐页边距、页面装饰、页眉页脚和页码;增加结构化公文、项目报告及标书 Front Matter,内置 Fandol 中文字体、两份教程和 14 份主题示例。

桌面工作流:重组更多菜单,增加新建、保存、另存为快捷键和未保存确认;另存为后跟随新路径,主题示例自动切换主题,Desktop 发行包完整携带教程、示例与字体。

问题修复:修正红头标题居中与正式文档字体;围栏代码按正文宽度自动换行,长内容安全断行,至少两行即可在当前页分页,并统一保留 8px 左侧内容留白;Docker Web 镜像正确打包 samples。

兼容与部署:未声明主题推荐设置时继续使用 16mm 默认页边距;Web 隐藏不适用的另存为。正式镜像 yixiong/md-to-pdf:v0.5.1 内容 ID 为 sha256:72f519a69bfd6cb2f6df30c2be938e58ceb6f20e4748a32551874de3d436b276,Compose 健康运行。

验证结果:最终修复前 65 个测试文件、286 项测试通过,最终代码块与主题定向测试 27 项通过;全项目类型检查、生产构建和 git diff --check 通过。容器检出 14 套主题、17 份 Markdown,代码块回归 PDF 为 2 页且无越界。NSIS SHA-256 为 676CCE73D782B0B15AC6BC68F253CFBC4740383583E4DAA98F746EDF9999C5CC,ZIP SHA-256 为 82BF6ADF1200604F145CC86FA3ED193955CF6741EBEE3DF8953483515CFF621F。
2026-07-29 16:58:17 +08:00

295 lines
5.4 KiB
CSS

@font-face {
font-family: "Mdpdf Fandol Song";
font-style: normal;
font-weight: 400;
font-display: block;
src: url("theme-shared:official-fonts/FandolSong-Regular.woff2") format("woff2");
}
@font-face {
font-family: "Mdpdf Fandol Song";
font-style: normal;
font-weight: 700;
font-display: block;
src: url("theme-shared:official-fonts/FandolSong-Bold.woff2") format("woff2");
}
@font-face {
font-family: "Mdpdf Fandol Fang";
font-style: normal;
font-weight: 400;
font-display: block;
src: url("theme-shared:official-fonts/FandolFang-Regular.woff2") format("woff2");
}
@font-face {
font-family: "Mdpdf Fandol Hei";
font-style: normal;
font-weight: 400;
font-display: block;
src: url("theme-shared:official-fonts/FandolHei-Regular.woff2") format("woff2");
}
@font-face {
font-family: "Mdpdf Fandol Kai";
font-style: normal;
font-weight: 400;
font-display: block;
src: url("theme-shared:official-fonts/FandolKai-Regular.woff2") format("woff2");
}
:root {
--letter-red: #d40000;
--letter-ink: #111;
}
#write {
color: var(--letter-ink);
font-family:
"Mdpdf Fandol Fang", "FangSong", "STFangsong", "Noto Serif CJK SC",
"Source Han Serif SC", "SimSun", serif;
font-size: 21.333px;
line-height: 1.75;
overflow-wrap: break-word;
text-align: justify;
text-justify: inter-ideograph;
}
#write .doc-masthead-official {
position: relative;
margin: 0 0 16mm;
padding: 0 0 5mm;
break-inside: avoid;
}
#write .doc-masthead-official::after {
position: absolute;
right: 0;
bottom: 0;
left: 0;
height: 1.2mm;
background:
linear-gradient(
to bottom,
var(--letter-red) 0 0.65mm,
transparent 0.65mm 0.95mm,
var(--letter-red) 0.95mm 1.2mm
);
content: "";
}
#write .doc-classification {
display: flex;
min-height: 1.75em;
justify-content: space-between;
font-family:
"Mdpdf Fandol Hei", "SimHei", "Noto Sans CJK SC",
"Microsoft YaHei", sans-serif;
font-size: 0.75em;
font-weight: 400;
}
#write .doc-issuer {
margin: 4mm 0 7mm;
color: var(--letter-red);
font-family:
"Mdpdf Fandol Song", "STZhongsong", "Noto Serif CJK SC",
"Source Han Serif SC", serif;
font-size: 1.65em;
font-weight: 700;
letter-spacing: 0.06em;
line-height: 1.3;
text-align: center;
text-indent: 0;
}
#write .doc-issue-row {
display: flex;
align-items: end;
justify-content: space-between;
font-size: 0.75em;
line-height: 1.5;
}
#write .doc-title {
margin: 0 0 10mm;
font-family:
"Mdpdf Fandol Song", "STZhongsong", "Noto Serif CJK SC",
"Source Han Serif SC", serif;
font-size: 1.375em;
font-weight: 700;
line-height: 1.45;
text-align: center;
}
#write h1:not(.doc-title),
#write h2,
#write h3,
#write h4,
#write h5,
#write h6 {
margin: 1em 0 0.35em;
font-family:
"Mdpdf Fandol Hei", "SimHei", "Noto Sans CJK SC",
"Microsoft YaHei", sans-serif;
font-size: 1em;
font-weight: 400;
line-height: 1.75;
text-align: left;
text-align-last: left;
}
#write h3,
#write h4,
#write h5,
#write h6 {
font-family:
"Mdpdf Fandol Kai", "KaiTi", "STKaiti",
"Noto Serif CJK SC", serif;
font-weight: 400;
}
#write .doc-signatory {
font-family:
"Mdpdf Fandol Kai", "KaiTi", "STKaiti",
"Noto Serif CJK SC", serif;
}
#write .doc-signatory > span {
font-family:
"Mdpdf Fandol Fang", "FangSong", "STFangsong",
"Noto Serif CJK SC", serif;
}
#write p {
margin: 0;
text-indent: 2em;
text-align-last: left;
}
#write .doc-issuer,
#write .doc-title,
#write .doc-signature p {
text-align-last: auto;
}
#write li > p,
#write blockquote p,
#write td p,
#write th p,
#write .doc-signature p,
#write .doc-edition p {
text-indent: 0;
}
#write ul,
#write ol {
margin: 0.35em 0 0.7em;
padding-left: 2em;
}
#write blockquote {
margin: 0.8em 0;
padding: 0.45em 0.8em;
border-left: 0.8mm solid var(--letter-red);
background: #fff8f6;
}
#write a {
color: inherit;
text-decoration: underline;
}
#write table {
width: 100%;
margin: 0.8em 0;
border-collapse: collapse;
font-family:
"Mdpdf Fandol Song", "SimSun", "Noto Serif CJK SC",
"Source Han Serif SC", serif;
font-size: 0.75em;
line-height: 1.5;
}
#write th,
#write td {
padding: 0.35em 0.55em;
border: 0.25mm solid #222;
}
#write th {
background: #f5f5f5;
font-family:
"Mdpdf Fandol Hei", "SimHei", "Noto Sans CJK SC",
"Microsoft YaHei", sans-serif;
font-weight: 400;
}
#write code {
font-family: "Cascadia Mono", Consolas, monospace;
font-size: 0.72em;
}
#write pre,
#write .md-fences {
margin: 0.8em 0;
padding: 0.75em 0.9em;
overflow: auto;
border: 0.25mm solid #aaa;
background: #f7f7f7;
line-height: 1.55;
text-align: left;
}
#write pre code {
padding: 0;
background: transparent;
}
#write .doc-signature {
width: 52%;
margin: 8mm 0 10mm auto;
break-inside: avoid;
text-align: center;
}
#write .doc-signature-issuer,
#write .doc-signature-date {
display: block;
margin: 0;
text-indent: 0;
}
#write .doc-edition {
margin-top: 8mm;
break-inside: avoid;
font-family:
"Mdpdf Fandol Fang", "FangSong", "STFangsong",
"Noto Serif CJK SC", serif;
font-size: 0.875em;
line-height: 1.7;
}
#write .doc-copy-to {
padding: 1mm 0;
}
#write .doc-printing-row {
display: flex;
padding: 1mm 0;
justify-content: space-between;
}
#write img,
#write svg {
max-width: 100%;
height: auto;
}
#write .footnotes {
margin-top: 1.5em;
padding-top: 0.6em;
border-top: 0.25mm solid #777;
font-size: 0.75em;
}