完善阅读器主题与批注界面

This commit is contained in:
shenlei
2026-07-13 13:01:14 +09:00
parent adc24d3f36
commit 6a0a1223b1
22 changed files with 133 additions and 189 deletions
@@ -136,6 +136,9 @@ struct RDEPUBStyleSheetComposer {
private static func darkCSS(style: RDEPUBTextRenderStyle) -> String {
let background = style.backgroundColor?.rd_cssString ?? "rgba(0, 0, 0, 1.000)"
let text = style.textColor?.rd_cssString ?? "rgba(255, 255, 255, 1.000)"
// Keep the established dark-theme compatibility rules, but explicitly
// clear the universal background that they would otherwise apply to image
// attachments when converted into attributed strings by DTCoreText.
return RDEPUBAssetRepository.string(for: .wxReadDarkCSS) + "\n\n" + """
html, body {
background: \(background) !important;
@@ -144,6 +147,9 @@ struct RDEPUBStyleSheetComposer {
a {
color: \(text) !important;
}
img, video {
background-color: transparent !important;
}
"""
}