完善阅读器主题与批注界面
This commit is contained in:
@@ -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;
|
||||
}
|
||||
"""
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user