@use 'variables' as *; @use 'mixins' as *; ::selection { color: $background-color; background-color: $primary-color; } ::-moz-selection { color: $background-color; background-color: $primary-color; } html { font-family: $base-font-family; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; &, body { width: 100%; height: 100%; } } body { margin: 0; color: $text-color; font-size: var(--font-size-body); line-height: 1.8; background-color: $background-color; font-family: $base-font-family; } article, aside, figcaption, figure, footer, header, hgroup, main, menu, nav, section { display: block; } audio, canvas, progress, video { display: inline-block; vertical-align: baseline; } audio:not([controls]) { display: none; height: 0; } [hidden], template { display: none; } a { background-color: transparent; color: $link-color; text-decoration: none; &:active, &:hover { outline: 0; } } abbr[title] { border-bottom: 1px dotted; } b, strong { font-weight: bold; // 移除下划线效果,让粗体更简洁 // text-decoration: underline; // text-decoration-line: underline; // text-decoration-style: dotted; // text-decoration-color: currentColor; // text-underline-offset: 5px; // text-decoration-thickness: 1px; } u { text-decoration: underline; text-decoration-style: wavy; text-decoration-color: currentColor; text-underline-offset: clamp(4px, 0.1em, 6px); // Responsive offset } dfn { font-style: italic; } // 中文着重号样式 - 不影响行高 .emphasis, .em { text-emphasis: filled circle; // text-emphasis-color: var(--color-primary); font-weight: normal; line-height: inherit; /* 保持原有行高 */ display: inline; /* 确保行内显示 */ } // 不同的着重号样式 .emphasis-dot { text-emphasis: filled dot; text-emphasis-color: var(--color-primary); line-height: inherit; display: inline; } .emphasis-circle { text-emphasis: filled circle; text-emphasis-color: var(--color-primary); line-height: inherit; display: inline; } .emphasis-triangle { text-emphasis: filled triangle; text-emphasis-color: var(--color-primary); line-height: inherit; display: inline; } .emphasis-sesame { text-emphasis: filled sesame; text-emphasis-color: var(--color-primary); line-height: inherit; display: inline; } mark { background: var(--color-warning); color: var(--text-inverse); } small { font-size: 80%; } sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } sup { top: -0.5em; } sub { bottom: -0.25em; } p { margin: var(--spacing-paragraph) 0; } ul, ol { margin: 1rem 0; &.nav, &.post-list { margin: 0; padding: 0; list-style-type: none; } } img { border: 0; max-width: 100%; margin: 1rem auto; display: block; } svg:not(:root) { overflow: hidden; } figure { margin: 1em 40px; } hr { box-sizing: content-box; height: 1px; border: 0; border-top: 1px solid var(--color-border, #e1e4e8); margin: 1.5rem 0; } pre { overflow: auto; color: var(--code-text); font-size: var(--font-size-code); background-color: var(--code-background); font-family: $code-font-family; } code { margin: 0 2px; padding: 3px 5px; color: var(--code-keyword); border-radius: 2px; white-space: inherit; font-size: var(--font-size-code); background-color: var(--code-background); font-family: $code-font-family; } // Relative font sizing for inline code in headings h1 code { font-size: 0.65em; // Relative to H1 size } h2 code, h3 code { font-size: 0.75em; // Relative to H2-H3 size } h4 code, h5 code, h6 code { font-size: 0.8em; // Relative to H4-H6 size } // 字体分离:标题使用黑体,正文使用宋体 h1, h2, h3, h4, h5, h6 { font-family: $heading-font-family !important; } // 确保正文内容使用宋体 body, p, article, section, li, dd, dt { font-family: $serif-font-family; } // 特殊元素保持黑体 nav, button, input, select, textarea, .nav, .button, .menu, .site-nav, .nav-link { font-family: $heading-font-family; } button, input, optgroup, select, textarea { color: inherit; font: inherit; margin: 0; } button { overflow: visible; text-transform: none; } button, html input[type="button"], input[type="reset"], input[type="submit"] { -webkit-appearance: button; cursor: pointer; &[disabled] { cursor: default; } } button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; } input { line-height: normal; &[type="checkbox"], &[type="radio"] { box-sizing: border-box; padding: 0; } &[type="number"] { &::-webkit-inner-spin-button, &::-webkit-outer-spin-button { height: auto; } } &[type="search"] { -webkit-appearance: textfield; box-sizing: content-box; &::-webkit-search-cancel-button, &::-webkit-search-decoration { -webkit-appearance: none; } } } table { width: 100%; margin: 1em auto; border-collapse: collapse; border-spacing: 0; thead { background-color: var(--surface-interactive); th { padding: 5px; min-width: 20px; } } tbody { tr:nth-child(2n) { background-color: var(--surface-elevated); } td { padding: 5px; vertical-align: text-top; } } } fieldset { border: 1px solid var(--border-primary); margin: 0 2px; padding: 0.35em 0.625em 0.75em; } legend { border: 0; padding: 0; } textarea { overflow: auto; } optgroup { font-weight: bold; } .container { margin: 0 10px 2em; } .hidden { display: none !important; } // Ruby 标注样式 - 为汉字添加假名读音 /* ruby { ruby-align: center; position: relative; display: inline-block; rt { font-size: 0.6em; color: var(--text-secondary); line-height: 1; text-align: center; font-weight: normal; // 强制设置正确的 ruby 位置 ruby-position: over; -webkit-ruby-position: over; -moz-ruby-position: over; // 确保显示为 ruby 文本 display: ruby-text; // 防止继承 text-emphasis 样式 text-emphasis: none; text-emphasis-style: none; } } */ img.emoji { width: 1em !important; height: 1em !important; vertical-align: -0.1em !important; margin: 0 !important; display: inline-block !important; }